Javascript error for PlaceholderFields in PlaceholderAdmin `add` view #1467

Closed
kezabelle opened this Issue Oct 8, 2012 · 0 comments

Comments

Projects
None yet
2 participants
Contributor

kezabelle commented Oct 8, 2012

When in the add_view for an object using PlaceholderAdmin, JavaScript errors occur in the plugin editor. It still behaves correctly, because obviously it has no functionality (You must save the page first to add plugins), but inspecting the page in Chrome's developer tools shows the following errors:

Uncaught SyntaxError: Unexpected token ) /admin/app/model/add/:line-number

Once for each Placeholder.

As far as I can tell, the reason is because this JavaScript should either occur within this if branch, or should be wrapped in {% if placeholder %}{% endif %} as placeholder isn't available until change_view is used and the object exists. The line generating the error is this one, where there's supposed to be an integer.

I might be in error on this ticket, as I'm also debugging some other, separate admin-related shenanigans, but...

(15:42:47) ojii: kezabelle, I prefer telling you you're being stupid on a ticket, makes it more public :D

FinalAngel was assigned Jun 3, 2013

digi604 closed this in #1974 Jul 1, 2013

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