If a collapsible fieldset is present on the page and the url contains a hash intended for jquery bbq, e.g. /#?foo=bar, then Drupal.behaviors.collapse.attach breaks because the hash is being used completely as a jquery element selector.
It seems to me that to use the hash as a selector is a big assumption.

I'm attaching an example diff that might address this, but I feel that it's only covering up a larger design issue of fieldset.collapsible.

Comments

aklump created an issue. See original summary.

aklump’s picture

StatusFileSize
new780 bytes
aklump’s picture

In the meantime if this is affecting anybody, here is a module that overrides core and fixes this issue in a don't-hack-core approach.

https://www.drupal.org/sandbox/aklump/2651232

David_Rothstein’s picture

Status: Active » Closed (duplicate)
Related issues: +#2395065: Certain URL fragments cause javascript error

I believe this is a duplicate of #2395065: Certain URL fragments cause javascript error, but feel free to reopen if I'm wrong.

aklump’s picture

Yes, indeed, same issue. Good call.