Closed sgordeychuk closed 8 months ago
@sgordeychuk Thanks for this excellent bug report!
I reproduce it also with djangocms-text-ckeditor==5.1.2
and django-cms==3.11.1
, i encountered this behavior and i thought about configuration problems before to search and see your report.
I wonder if a downgrade to djangocms-test-ckeditor<=5.1.1
could fix this temporarily, however a new migration have been passed in previous release so it's not a workaround for those ones that already upgraded recently..
The same issue in our project. Project setup:
@fsbraun , @marksweb , hello.
Do we know when we can release new version of djangocms-text-ckeditor to pypi where there is such important fix?
@DmytroLitvinov Here's the PR: https://github.com/django-cms/djangocms-text-ckeditor/pull/653
@fsbraun thanks a lot for the fix! I've tested it with my setup and everything works great now. Should I close the ticket or will you do it?
Just done! Thanks ;-)
Steps to reproduce
Expected result
Only new nested plugin was removed, but the text content and old plugins remains the same
Actual result
The whole content of plugin is cleared, the whole old published content is lost
Analysis
I've tried to debug the issue and found that
cms.admin.placeholderadmin.PlaceholderAdminMixin.edit_plugin
is called on Cancel click because newly created plugins should be cleared, which is make sense. Although inside that method I can see that new Text plugin instance is created, then plugins which are not needed should be cleared. But even addingplugin.body = obj.body
there doesn't help, because it's being overwritten somewhere inside in operations.CHANGE_PLUGIN calls.Do you have any ideas where to look at? I have a feeling that it's something with post_placeholder_operation call which doesn't copy the content from the old plugin, but not sure.
djangocms-test-ckeditor==5.1.1 (also reproducible with 5.1.2) djangocms==3.9.0 (but also reproducible with 3.11.1)