I'm getting all js broken on system pages, and this in the console:

Uncaught TypeError: Cannot call method 'split' of undefined

CommentFileSizeAuthor
#3 1405174.3-relatedlinks-sanity-check.patch725 bytesmrfelton

Comments

mrfelton’s picture

relatedlinks.js, line 15

mrfelton’s picture

Status: Active » Fixed

Turns out it was actually a problem with vertical_tabs-1.0-rc1 that was causing form_alter to get called twice when it shouldn't. Upgrading to vertical_tabs-1.0-rc2 resolved!

mrfelton’s picture

Status: Fixed » Needs review
StatusFileSize
new725 bytes

Spoke too soon. It is a problem with relatedlinks. The vertical Tabs module retrieves the node form on the node type form in order to work out what fields are available. This causes form_alter to be run twice. This causes the relatedlinks javascript to be added to the node type forms as well as the node forms.

Attached patch checks if the related-links fieldset is actually on the page as a sanity check - since we only want to process the related links if its actually on the page - not just because an implementation of hook_form_alter has been called.

Zen’s picture

Status: Needs review » Needs work

This looks like something that should be fixed in a/the form_alter.

-K