Jump to content

Unable to save to 'field_title' for page that doesn't exist in pages table


Jozsef
 Share

Recommended Posts

I'm creating a new page from a form submission. It has been working perfectly but now it fails to save the new page with the error message:

Error saving field "title" - Unable to save to 'field_title' for page that doesn't exist in pages table

Can any of you spot any error in my code? It's directly in a template file.
I probably just can't see the wood for the trees after hours of searching.
The funny thing is that I haven't changed anything in that part of the template.

   // create the page
    $order = new Page();
    // Set the template
    $order->template = $templates->get("order");
    // Set the parent page
    $order->parent = $pages->get("/orders/");

    // Set the title/name field
    $order->title = $event_title . " - " . $u->first_name . " " . $u->last_name;
    // $order->headline = $headline;
    $order->order_event = $event;
    $order->order_user  = $u->id;
    $order->quantity = $qty;
    $order->price = $price;
    // Calculate and save total
    $order->total = $total;
    $order->handling = $handling;
    $order->balance = $balance;

    // save the order
    $order->of(false);
    $order->save();

Update:

New pages don't save from the backend either, giving the same error message for each field as admin notifications.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...