Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how plugins should 'clean' child plugins on save #3731

Closed
jsma opened this issue Jan 7, 2015 · 4 comments
Closed

Document how plugins should 'clean' child plugins on save #3731

jsma opened this issue Jan 7, 2015 · 4 comments

Comments

@jsma
Copy link
Contributor

jsma commented Jan 7, 2015

I found a data corruption error in djangocms-text-ckeditor where it attempts to clean up child plugins (aka plugins that have been removed from the wysiwyg editor). See the ticket for more details on the bug django-cms/djangocms-text-ckeditor#212

This ticket is to make sure there is a documented path for all plugins (divio or custom) to handle child plugin cleanup correctly without corrupting the database. This will likely require code changes in django-cms but am keeping this to a documentation ticket for the moment until consensus is reached on what needs to be done to resolve this.

@jsma
Copy link
Contributor Author

jsma commented Jan 7, 2015

The ticket mentioned above was fixed by moving the order of operations around. This seems error prone. We should strive to make this simpler so that it's foolproof. This may require users to write their own clean_plugins method but have this be called automatically at the bottom of CMSPlugin.save() instead of in CMSPluginBase.save_model(). This would mean that any API calls would also benefit from the post save cleanup, not just admin/front-end users.

@yakky
Copy link
Member

yakky commented Jan 7, 2015

While text plugin is really the only one that I know of needing this "special" cleanup, I like the idea of having a documented and supported way to do this, and your suggestion looks sensible

@yakky yakky added this to the 3.1 milestone Jan 7, 2015
@yakky yakky modified the milestones: 3.1, 3.1.x Apr 18, 2015
@yakky yakky modified the milestones: 3.1.x, 3.2 Jun 7, 2015
@FinalAngel FinalAngel modified the milestones: Clean up issues & pull requests, 3.2 Nov 2, 2015
@Aiky30
Copy link
Contributor

Aiky30 commented Oct 15, 2020

@yakky Do you have any plans to implement this documentation? I have implemented an invisible fix for this because the ghosting broke the new position based plugin architecture in v4.

@Aiky30
Copy link
Contributor

Aiky30 commented Oct 23, 2020

This is fixed in a future version of ckeditor for Django CMS v4: https://github.com/django-cms/djangocms-text-ckeditor/tree/support/4.0.x

@Aiky30 Aiky30 closed this as completed Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants