On my site, I was getting this javascript error:
Uncaught Error: Syntax error, unrecognized expression: div#panels-ipe-display-function
Turns out that in line 32 of panels_ipe.js, Drupal.settings.PanelsIPECacheKeys is iterated using:
for (var i in Drupal.settings.PanelsIPECacheKeys) {
I debugged this line and saw that the first value of Drupal.settings.PanelsIPECacheKeys[i] was the correct key, but the next two were members of the Drupal.settings.PanelsIPECacheKeys object were functions. (specifically i was first 0, then "contains", then "mergesort").
If this line was changed to :
for (var i=0; i<Drupal.settings.PanelsIPECacheKeys.length; i++) {
Only correct values for "i" (aka keys referencing strings and not functions) would be returned. Please correct this line.
Comment | File | Size | Author |
---|---|---|---|
#4 | panels-ipe-js-loop-2226011-4.patch | 578 bytes | samuel.mortenson |
Comments
Comment #1
samuel.mortensonComment #2
samuel.mortensonComment #3
samuel.mortensonComment #4
samuel.mortensonHere's an actual patch to fix this, sorry for not submitting it originally.
Comment #7
samuel.mortensonI noticed that two people have re-queued this patch for testing - anyone care to RTBC?
Comment #8
NitebreedHmm I also use Panels IPE, but I'm not running into this error (using the latest dev version of panels though)
I have the feeling the code causing the error may already have been fixed (you still use 7.x-3.3?)
What are the steps to reproduce this error?
Comment #9
samuel.mortensonUnfortunately at the time I submitted the issue I was working with a client who I no longer have access to, so I'm not able to replicate the error. I assume that others have used this patch as there are 6 watchers, so if they could chime in that would help push this along. :)
Comment #10
leahtard CreditAttribution: leahtard at The Jibe commentedThank you for this fix @samuel.mortenson. I just ran into the same error with Mini Panels IPE.
Before this patch, I would click on "Customize this page" and there would be no popup. I do have other Mini Panels that were working correctly. There were a few specialized factors associated with the problematic Mini Panel:
- All of my mini panels were views that were listing a particular Display Suite view mode. So not a field based view.
- My problematic Mini Panel was displaying an Image that had a custom formatter. This formatter has some JS included. I assume this was casing some sort of conflict.
I am happy to provide more details if needed.
Cheers, Leah
Comment #11
samuel.mortenson@leahtard Care to mark the issue as RTBC? If the patch is working for you and makes sense, of course.
Comment #12
dan.munn CreditAttribution: dan.munn at Unipro Ltd commented@samuel.mortenson closing this as a duplicate of issue #2161223 which was raised 3 months prior to your bug; the original proposed patch there contains the same fix, but also fixes other for loops that are likely to suffer the same problem.