To reproduce:
- Go to http://drupal.org/node/add/project-project - see the source, project.js is loaded.
- Submit the form without fill any field.
- You'll got an error page for some required fields. And now, project.js is not loaded in the source anymore.
This bug was discovered by eliza411 with the Git migration (see #1045014: Project shortname field visible after form validation error), and since I already have the same trouble (in #908910: JS/CSS files not loading after a validation error), I think it can be solved with the same way, adding the required js in an #after_build function.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1059992-project-js.patch | 1.24 KB | danillonunes |
Comments
Comment #1
danillonunes commentedThis patch seems to fix the bug.
-- Edit: Oh, and I move the javascript function out of the
if (project_use_taxonomy()) { }too, since the sandbox behavior looks to be not taxonomy-related.Comment #2
dave reidComment #3
dwwNot quite. There was another call to drupal_add_js() to send down a setting that was used by the sandbox JS logic which also needed to be moved. Fixed that, cleaned up the code comments and code style, and committed to HEAD: http://drupal.org/cvs?commit=501310
Thanks!
-Derek