U4-9924 - Modifying data in ContentService.Publishing or ContentService.Saving does not update the UI, and re-saving overwrites data with un-updated UI data

Created by Murray Roke 17 May 2017, 05:20:31 Updated by andiih 21 Jun 2017, 16:42:32

This is similar to U4-3004 except this issue is for the appropriate event types. If you use an event, such as ContentService.Publishing or ContentServcie.Saving to update a property (say "importantChangeDate") with a new value then the changes are correctly made to the published content. However, an editor will not see these changes immediately after publishing a page - they need to reload the page to see the updated content.

IMPORTANTLY, if the user then saves again the data that was not updated is written over the top of the updated data. (there are many reasons why the event should not update the property this second time, eg in my case the second save isn't an important change.)

The changes from the event handlers should be reflected immediately after a page is published/saved.

Comments

Shannon Deminick 17 May 2017, 06:11:47

Thanks @Murray.Roke , what happens when you just do "Save" and using the "Saving" event, are the changes shown in the editor? ... they should be, seems odd this isn't working as i'm sure it used to. Have you tested in the latest Umbraco version?


Murray Roke 25 May 2017, 04:08:16

Um no I haven't tried the latest umbraco, sorry. If I get round to it I'll update this ticket. Modifying the value on the "saving" event has the same issue as modifying a value on the "publishing" event


Murray Roke 25 May 2017, 05:13:48

NB: setting a boolean ("true/false" datatype) seems to work (and is reflected), setting a date ("date picker with time" datatype) does not update (and the change is not reflected in the ui)


andiih 21 Jun 2017, 15:04:46

I'm seeing the same issue in 7.5.6 - testing with a DatePicker datatype within the ContentServiceSaving event. Data is updated in both the database and cache (with or without adding an extra contentService.Save in the code), but the UI does not reflect that change without a refresh.


andiih 21 Jun 2017, 16:42:32

To add to this, the data set during the ContentServiceSaving event is returned in the tabs[n].properties[m] structure of the response from PostSave, so I think this must be a client side binding issue. If I change the PropertyType to a text box, then everything works as expected - so again, date binding with dates seems to be the cause.


Priority: Major

Type: Bug

State: Open

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.4.3, 7.5.6

Due in version:

Sprint:

Story Points:

Cycle: