Front-end editing creates empty plugins if creation is canceled #861

Closed
floppya opened this Issue Jun 11, 2011 · 11 comments

Comments

Projects
None yet
7 participants
Contributor

floppya commented Jun 11, 2011

Using the front-end editing in the develop branch creates empty plugins if you cancel the creation. In addition, this empty plugin will not show up in the front-end (similar to issue #555?).

To reproduce, choose a plugin from the front-end placeholder 'add' plugin menu, then click cancel. Now look in the admin for that page and you'll see an empty plugin.

Owner

FinalAngel commented Jun 12, 2011

The new toolbar inherits this feature sadly from the old toolbar where the plugin first needs to be created. The empty plugin should be actually shown within the frontend than as well (as empty)

ojii was assigned Jun 12, 2011

calinf commented Oct 28, 2011

The 'Cancel' button in the plugin editing form is broken and it can be fixed by changing the type from submit to reset and adding a 'button' css class to preserve the original aspect:

<input type="reset" class="button" style="margin-left: 8px;" value="{% trans "Cancel" %}" name="_cancel">

FinalAngel was assigned Oct 28, 2011

Member

digi604 commented Oct 4, 2012

Is this still the case with #1461 merged?

Contributor

kux commented Oct 7, 2012

This still reproduces

Contributor

evildmp commented Dec 6, 2012

Just a note that this doesn't only affect front-end editing.

Also, I think it's one of the things that's breaking cms moderator on #1463

Collaborator

ojii commented Jan 27, 2013

Member

digi604 commented Mar 29, 2013

@ojii can you open a PR for t861 so we can easily see the diff?

Member

digi604 commented Feb 7, 2014

this should be fixed now

digi604 closed this Feb 7, 2014

Collaborator

ojii commented Feb 9, 2014

out of curiosity, what commit was this fixed in?

Owner

FinalAngel commented Feb 10, 2014

@ojii we reimplemented the behaviour that frontend clears the plugin:
https://github.com/divio/django-cms/blob/develop/cms/static/cms/js/plugins/cms.modal.js#L138

Yet, if you refresh the browser while creating a new plugin, an empty plugin will show up. The problem before was, that an empty plugin was created, but now shown (was invisible basically).
This could cause issues when you add a plugin, cancel and than later remove the package. This can cause 404's cause the plugin is there, invisible with no options to remove it.

Collaborator

ojii commented Feb 10, 2014

Ah, so not "properly" fixed yet. Thanks for clarifying @FinalAngel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment