Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2475529-panels-error.patch | 994 bytes | mthomas |
Comments
Comment #1
mthomas CreditAttribution: mthomas commentedComment #2
mthomas CreditAttribution: mthomas commentedComment #3
Danny EnglanderThis patch works to fix this error. To be fully transparent, I work on the same team as @mthomas.
Comment #4
stefan.r CreditAttribution: stefan.r commentedShould $selects be empty though?
Comment #5
stefan.r CreditAttribution: stefan.r commentedIMO 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.
Comment #6
GoldThe 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.