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.
works fine, after changing the line 73:
.attr('id') to .attr('class')
Comment | File | Size | Author |
---|---|---|---|
#10 | fragment_checking.patch | 1.32 KB | Wim Leers |
#3 | panels_tabs-296373-3.js_.txt | 998 bytes | aasarava |
Comments
Comment #1
tbee CreditAttribution: tbee commentedafter upload to server appears this bug again...
if you enter the page with not selected any from the tabs, there will be a script error in IE7 and older...
after you select any from tabs and refresh browser, everything's fine...
can anyone help ?
Comment #2
tbee CreditAttribution: tbee commentedI could only fix the bug entering the id...
example:
var id = $('a[@href*="'+ fragment +'"]')
.parent() // the parent li
.parent() // the parent ul
.parent() // the parent div (the actual tabset div!)
.attr('id')
.substr("tabs-".length);
updateLinks(id, fragment);
to
var id = "mini-panels-minipanels";
where "minipanels" is the id of my element in drupal...
Comment #3
aasarava CreditAttribution: aasarava commentedI've submitted a patch that seems to resolve this issue.
The problem is that when the URL contains just the site domain and no path (i.e., the home page), the call to currentURI.indexOf('#') evaluates to -1. In other words, there is no # in the current URI, because there is no path in the URI.
Unfortunately, the JavaScript error that gets thrown down the line because of this also prevents other JavaScript code from executing -- so you can end up having problems in other modules, like we did on a recent project with simplemenus.
My solution was to include a check to make sure the indexOf call is > -1 before processing further:
Hope that helps.
Comment #4
tbee CreditAttribution: tbee commentedthanks a lot!
it works fine now ;)
Comment #5
hargobindTested, and works great. Thanks!
aasarava is correct... this bug not only fails for the Panels_Tabs module, but it also has the potential to break all other scripts on the page. I'm suggesting this bug be moved to Critical priority and pushed as a new release because of it's effect on other functions of the site.
Comment #6
aasarava CreditAttribution: aasarava commentedExcellent. Happy to help.
Comment #7
Wim LeersI'll get this in tomorrow.
Comment #8
phacts CreditAttribution: phacts commentedI applied this patch to panels_tabs.js, and it works quite well. However, in one case it does not - I have a mini-panel that consists of comments and the comment form. When I post a comment, Drupal automatically sends me to example.com/page-name#new. The #new bit was causing the original error to recur, so I came up with a fairly ugly solution:
I don't consider my javascript skills to be all that good, so I don't know if this is good enough to patch for others, but someone might want to take a look at this and potentially suggest a better solution...? Either way, I've tested this, and it works.
Comment #9
steveoliver CreditAttribution: steveoliver commentedThanks, aasarava!
Comment #10
Wim LeersI'm ashamed that it took me so long to get back to this. I've handed over the 6.x version to dereine and am now cleaning up the issue queue for 5.x.
Please review the following patch, which implements aasarava's bugfix and phacts' extension of that, but in a cleaner way.
Comment #11
crea CreditAttribution: crea commentedI had problems with 6.x version sometimes throwing error in IE, something about parent elements, and this patch removed this error.
Comment #12
moonray CreditAttribution: moonray commentedI can verfiy that the patch fixes the problem for IE in version 6 as well.
Comment #13
ptoly CreditAttribution: ptoly commentedI'm afraid this problem continues with me, even after the patch.
I have a tabbed page with a mini panel as the default landing view. On some pages the top block of the mini panel shows up but the two column mini panels underneath fail to appear. On another page the whole page fails to appear until I click on another tab and come back.
After running the patch I don't get the script error 'parent().parent().parent().attr(...)' is null or not an object error in the console but the mini-panels don't appear until I click on a tab and click back.
I can also get the content to appear by modifying the CSS using IE dev toolbar.
This is only in IE 7. I don't see any js errors in FF PC or Mac or in IE 8, for that matter.
EDIT:
Please disregard this post. It does not belong here. Patch worked fine. This is an issue with rounded corners in IE7.
Comment #14
Wim LeersThanks for the feedback. Committed!
- D6: http://drupal.org/cvs?commit=275152
- D5: http://drupal.org/cvs?commit=275154