I found a bug using cck fieldgroup tabs when rendering fielgroups from path_redirect.
The path_redirect adds a fieldset with links to the path_redirect add form with the configuration in variables.
The tabs.js selector ('.drupal-tabs ul').children('li').each() finds any li tag inside the drupal-tabs, and even the path_redirect ul li from the links into the fieldset,
the next selector $($(this).find('a').attr('href')) creates this exception breaking the tabs:
uncaught exception: Syntax error, unrecognized expression: /admin/build/path-redirect/add?destination=node%2F264%2Fedit&redirect=node%2F264&language=
In order to avoid the selector searching nested li's I propose changin the selector from
$('.drupal-tabs ul').children('li').each( to $('.drupal-tabs').children('ul > li').each(
this way only search for the first ul->li pairs and not any other ul->li structure into the tab
Comment | File | Size | Author |
---|---|---|---|
tabs_js_selector.patch | 538 bytes | jcmarco |
Comments
Comment #1
nedjoThanks, makes sense, committed.
Comment #3
Moonshine CreditAttribution: Moonshine commentedI know I'm really late to the party here, but I finally updated tabs using the latest dev and this change seems to create some very odd css error assignments for me. It's weird that I would be the only one, so I'm tentative about re-opening the issue, but I will in case someone else can take a peek. If the goal was just to change the code such that only the first UL element (with the "tabs") is picked up, then the following seems appropriate and works fine for me:
I think this would be the right approach, but will defer to the jquery masters. :)