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

Duplicate form id #blueprints on the same page in the admin panel #1216

Closed
TomOne opened this issue Sep 5, 2017 · 1 comment
Closed

Duplicate form id #blueprints on the same page in the admin panel #1216

TomOne opened this issue Sep 5, 2017 · 1 comment
Labels

Comments

@TomOne
Copy link
Contributor

TomOne commented Sep 5, 2017

In the admin panel there are sometimes multiple forms with the same id #blueprints on the same page, which is not allowed by the HTML standard. For example, there are 4 forms with the same #blueprints id on editing pages, e.g. /admin/pages/home. This can lead to problems, especially with JavaScript.

For instance it causes the language switcher in MS Edge (fixed in my pull request #1213) to break randomly because the form attribute polyfill uses id selectors for forms in JavaScript.

I’ve noticed that the Twig partials for the forms support a form_id variable, so it should be enough to just pass unique ids to form_id when including the partials, right?

@rhukster rhukster added the bug label Sep 5, 2017
@rhukster
Copy link
Member

rhukster commented Sep 5, 2017

Yes, that's basically the solution. I've fixed the pages.html.twig to ensure that the modals each use a custom form_id. If you find any more please let me know or fix them yourself in a PR and i'll merge it. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants