In some cases, when the node form for example doesn't contain any fieldsets, the setSummary function is not available, and due to this node.js's code fails. There is no check if the function exists as in some other JavaScript files.
| Comment | File | Size | Author |
|---|---|---|---|
| node.js_.patch | 471 bytes | Poetro |
Comments
Comment #1
quiptime commentedComment #2
cburschka#445130: Namespace the Drupal jQuery functions renamed this function to drupalSetSummary(); needs a short reroll.
Comment #3
bcn commentedShouldn't this be
if (typeof jQuery.fn.drupalSetSummary == 'undefined')?I'm leaving as 'needs work' for now, but I've added a patch over at #445130: Namespace the Drupal jQuery functions that includes the fix for this issue too... If that get committed first, we can mark this as a duplicate.
Comment #4
jpmckinney commentedI had a look at the patch in #445130: Namespace the Drupal jQuery functions, but that patch doesn't replace all occurrences of setSummary with drupalSetSummary. I believe this should be set to be a dup of #770312: Calls to setSummary() must be renamed to drupalSetSummary(), which has a working patch that fixes the problem. I think #445130: Namespace the Drupal jQuery functions should be set back to fixed.
Comment #5
jpmckinney commentedI merged all the available patches from the three issues cited and set the issues to duplicate of #445130: Namespace the Drupal jQuery functions
Comment #6
cburschkaThis bug doesn't have much in common with the namespacing thing, other than being related to the same function. As we found out in #24, #28 and #29 of the other issue, it's an edge case in multistep forms that should be investigated a bit more, while the other issue just needs to replace four outdated function names.
So I'd argue this isn't a duplicate we can simply merge into the other patch to fix two problems in one go. Setting this back to CNW since the last patch is out of date with HEAD.
Comment #7
jpmckinney commentedOk, linking to relevant comments in other issue:
#445130-24: Namespace the Drupal jQuery functions
#445130-28: Namespace the Drupal jQuery functions
#445130-29: Namespace the Drupal jQuery functions
Most relevant in terms of tracking down the bug:
Comment #8
gappleI ran into this when making modifications to the node form, pulling the revision information out of the vertical tabs and hiding the rest. Since the vertical tabs are no longer rendered, form.js isn't available, but node.js is still added in
#attached.Though it fixed the problem in my instance, just removing the attached scripts could cause other problems if another module made modifications.