Jump to content

Recommended Posts

Posted

Hi all,

I'm just trying to update a custom field value for a page but I noticed in the DB that the old value is still there?

Rather than updating, it appears to create a new record for the updated value and increments the sort value.

Why is this? Is it not possible to just overwrite the value within the DB using the API?

For example:

    $pageObject->of(false);
    $pageObject->customField = "Updated Value";
    $pageObject->save();
    $pageObject->of(true);

 

I would have expected the value just to be overwritten and persisted to the field table in the database?

Obviously I am missing something or just not grasping why it works like this?

Posted

Scratch that turns out I had the 'Deference in API as' set to 'Multiple pages' under the fields Details tab.

Figured this might be of use to others so i'll leave this here.

  • Like 1

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
×
×
  • Create New...