To reproduce:

  1. Go to http://drupal.org/node/add/project-project - see the source, project.js is loaded.
  2. Submit the form without fill any field.
  3. 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.

CommentFileSizeAuthor
#1 1059992-project-js.patch1.24 KBdanillonunes

Comments

danillonunes’s picture

StatusFileSize
new1.24 KB

This 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.

dave reid’s picture

Status: Active » Needs review
dww’s picture

Status: Needs review » Fixed

Not 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

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.