If you create a HS form then add it to a panel, the follow JS error appears from line 136 of hierarchical_select.js

Uncaught TypeError: Cannot read property 'replace' of undefined

This appears to be because $selects (line 134) is empty, thus there are no elements to .replace(). The js is being attached when the panel pane's content attempts to render for the admin page. Hacky patch attached.

CommentFileSizeAuthor
#1 2475529-panels-error.patch994 bytesmthomas
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mthomas’s picture

FileSize
994 bytes
mthomas’s picture

Issue summary: View changes
Danny Englander’s picture

This patch works to fix this error. To be fully transparent, I work on the same team as @mthomas.

stefan.r’s picture

Priority: Normal » Major

Should $selects be empty though?

stefan.r’s picture

IMO this is a major issue so we may have just to commit this workaround if no-one posts anything better, but I on't much like the hackiness of this patch. We should probably catch this earlier by not attaching the JS at all.

Gold’s picture

Status: Active » Postponed (maintainer needs more info)

The issue summary is reasonably good but I am still having trouble figuring out how to set this up to replicate the issue and I need to do that in order to test the patch.

If this is still an issue could the summary be updated with detailed steps to replicate the issue. Start from a clean D7 install with the Standard profile. List the modules you're adding, content types added/edited, any configuration needed etc.