Hi,
I have added new settings for rich text editor blocks and now after editor is loaded the settings are added in markup which causes a change so we get “Discard changes” modal. For now only workaround is to manually save a page, but we have thousands of pages… And programmatically trigger save or publish doesn’t work because this is triggered after editor loads.
Is there any good way to solve this to get rid of “Discard changes” modal?
If you look at the property data for your rich text editor, can you compare the before and after? If so, you could then see the difference(s) and either write an endpoint or migration that amends the affected property data via the IContentService to the updated JSON format, or you could try manipulating the property data directly, either via the database (if you are confident with SQL and careful) or by updating the uSync files and re-importing.
Obviously, with thousands of pages you may need to think carefully about your approach and what works best for you.
Either way, make sure you have a backup and test it thoroughly outside of production first.
It does sounds like the Discard changes modal should not display just because you’ve added new settings (unless the settings are changed from their default values). It may be worth raising this on the issue tracker: