When I use Panels to override a node add/edit form, it would seem that Panels adds a set of [form][/form] tags around the pane that contains node form elements *and* an extra set around CCK fields might happen to be defined on the node.
The latter appears to break IE, as it apparently interprets the [/form] after a CCK field as the end of ALL forms.
Chrome, Firefox and Safari are all happy to submit the form, despite having nested tags. Internet Explorer is not. I received a bug report from an IE7 user who was unable to save nodes (nothing happens when you click submit) and can confirm it also happens in IE9.
I expect the problem is that panels injects a bunch of nested [form] tags when it really should be using a singe one.
I'm not currently able to test on D7, but will when I get the chance.
Comment | File | Size | Author |
---|---|---|---|
#3 | panels-form-bug.txt | 50.66 KB | RunePhilosof |
Comments
Comment #1
cafuego CreditAttribution: cafuego commentedKind of related to #1158850: Cannot use multiple forms in the same panel (wrongly nested forms) probably, though I'm not using Views with it.
Comment #2
Letharion CreditAttribution: Letharion commentedI seem to remember from an unrelated discussion with a colleague that a large
wrapping element is the case in D7 as well, however, I haven't heard that this would break in IE.
Comment #3
RunePhilosof CreditAttribution: RunePhilosof commentedThis is also a problem for me in the newest version using D7.
Only when I activate panels_everywhere site_template though.
Then I get the problem in the user edit panel.
Steps to reproduce:
* Drupal 7.17
* Ctools 1.1
* Panels 3.3
* Panels_everywhere 1.0-rc1
Activate site_template, add a variant with page_content
Activate user_edit page, add a variant with the general form
Add a new user (user/1/edit uses different logic and theme)
Go to /user/2/edit, look at the html.
The HTML will contain a form element too early, see the attached panels-form-bug.txt, you will find two times two form tags.
Comment #4
RunePhilosof CreditAttribution: RunePhilosof commentedComment #5
RunePhilosof CreditAttribution: RunePhilosof commentedI have a search form in my site_template. This bug naturally destroys the search form functionality on the edit page because nested form tags are disallowed and thus ignored.
Comment #6
noslokire CreditAttribution: noslokire commentedI think this is related to this #1649046: Node forms render as invalid HTML (two form tags) , only difference is that this one is user/edit and the other is node/edit
Comment #7
albib CreditAttribution: albib commentedIf you are seeing to form tags in middle of the page the patch in #1649046: Node forms render as invalid HTML (two form tags) solves the problem.
But if you use Panels everywhere you get a form tag put around the entire page. Our solution is to use hook_page_manager_contexts_alter() in order to remove the form tag:
Comment #8
RunePhilosof CreditAttribution: RunePhilosof commented#6: That patch doesn't help much. Before I had two times two form tags, with that patch I have two times one form tag. It doesn't change my problem.
Comment #9
RunePhilosof CreditAttribution: RunePhilosof commentedEarlier I wrote that /user/1/edit didn't exhibit the problem.
However, in my current test it was present in /user/1/edit.
So no need to create a user for this test.