Hi,
I've stumbled across a, in my situation, big problem. When a form is but into a panel page stuff is going on in ctools.module at line 629. The form's action attribute is replaced with $_GET['q'] every time this is called, which is a good thing in most cases, as we want the form submit to redirect to the page we are on - despite what the original form is saying.
BUT a very huge problem envolves when the form has ajax fields included, in my case a managed_file upload field :-/ When you upload the file before hitting the submit button the form's action attribute is replaced with the ajax/file/{something_more}. Then lets say you have validation on fields also which is first checked at the submit. Now when the page has reloaded and shown you the error, corrected your mistakes and submit again you get a page with an ajax json object. That's a bit fucked up :-)
Big thanks to the maintainers for this great module which is sitewide used for all kinds of great stuff.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | file_upload_in_form-2622686-2.patch | 863 bytes | pmchristensen |
Comments
Comment #2
pmchristensen commentedI've found a simple solution where we only do this replacement once on the form's action attribute, when the form is initialized - seems to work perfectly. Added it as a patch to this issue and really hope it will help others and be adopted to the module.
Comment #3
chris matthews commentedThe 3 year old patch in #2 to ctools.module applied cleanly to the latest ctools 7.x-1.x-dev and (if applicable) still needs review.