Getting some insight of page field data

Hi, I’m hunting down a very strange bug and it would help if I could get some more info about the internal workings of pageFieldData.

The bug is simply that: Sometimes page field data added to a page via Fields.AddOrUpdateValue is present in the database (Sites.PageFieldData) but not displayed in the admin edit forms nor the frontend.

My guess is that this is due to some formatting problems, but I get no errors and the data gets inserted into the database.

To debug this I need to understand the database structure better. Data seem to be inserted into Sites.PageFieldData but also to Sites.DraftPageFieldData ?? But if I directly altering field data (for debug purposes ) in PageFieldData and DraftPageFieldData the changed will not be displayed in admin edit forms until I publish the post again.

Q1: Should the data be displayed in admin/edit if I updated the date directly in the DraftPageFieldData field? or is this loaded from a third place?

Q2: On the first insert using AddOrUpdateValue should the data in the Sites.DraftPageFieldData be an exact mirror of Sites.PageFieldData or should de only be populated in on edit?

Right now, the filed data is missing in Sites.DraftPageFieldData present in Sites.PageFieldData and not displayed in admin.

Thanks!

Litium version: 7.1

Is that for all fields or only some fields that is from a specific field type?

All the data is cached in the application and you need to restart the application to get the information updated in application.

When you edit in back office everything is stored in the DraftPageFieldData-table and when you publish it is copied over to the PageFieldData-table.

If you implemented an own object that is used for the field, the object need to implement the Litium.ComponentModel.IReadOnly, if you have missed to do that the data in the cache is changeable and when you update the draft page in back office the change is sometimes reflected and persisted and other times it is not.

1 Like

Thanks for the information! This helped me solve several bugs!