Active
Project:
Gallerix
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2009 at 15:43 UTC
Updated:
1 Sep 2011 at 01:17 UTC
Jump to comment: Most recent file
I have a problem with Gallerix module (AJAX fonction), so I tried to add gallery nodes to exception list, like this:
-Statically cache specific pages:
-Cache every page except the listed pages.
node/75 - my gallery node.
But this node always cached and annonym users cannot use AJAX gallery fonction with IE browser:
Webpage error details
Message: Invalid character
Line: 434
Char: 3
Code: 0
URI: http://www.madfanboy.com/site/sites/default/files/js/js_aba32314c4039c03...
Line 434: var json = eval('('+ content +')');
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | gallerix.patch | 389 bytes | mikeytown2 |
| #7 | gallerix-617038.patch | 109.98 KB | mikeytown2 |
| #6 | fsdfdsfsd.jpg | 67.29 KB | superfedya |
Comments
Comment #1
mikeytown2 commentedProblem here is with the Gallerix Module. Module looks like it's abandoned; author used drupal_to_js() instead of drupal_json() when outputting JSON to the browser. Looks like he even made his own hack to get it to work.
Anyway all calls to
print gallerix_to_jsshould be replaced withdrupal_jsonand the Boost & this module should work then.As for the setting, when I go to node/75 I get a 404 which means that node doesn't exist. Make sure you have the right node id.
Comment #2
superfedya commentedhttp://www.madfanboy.com/site/node/75 100% working.
So, if I am not a programmer, no way I can fix Gallerix?
Comment #3
mikeytown2 commentedPut
site/node/75in the box then instead ofnode/75Comment #4
superfedya commentedI tried site/node/75, not effect.
But node/75 it is a working path, I use the same for blocks exception.
Comment #5
mikeytown2 commentedI just tried the
Setting and it works... I need more info on your particular setup and the issue your encountering because code does work out of the box.
Comment #6
superfedya commentedI just disable all my modules, except Boosts and Gallerix - same results. I tried on my shared hostig, as on localhost - always same result.
But, if I use Firefox or Chrome browser, Gallerix works perfectly with a Boost, problems only with a Internet Explorer...
Comment #7
mikeytown2 commentedhttp://drupal.org/patch/apply
Patch is extra large due to my text editor auto correcting white space issues in the module. All this does is replace
print gallerix_to_jswithdrupal_json. You need to apply this patch to the gallerix module; Boost tends to bring out the flaws in code, including my own code.See if the
Cache every page except the listed pages.setting works with gallerix disabled.Comment #8
superfedya commentedThanks!
I apply this patch on my localhost and now pictures dont load with any browser and even for auth users...
Line:108
Char:3
Code:0
Error:Syntax error
URL:http://localhost/site/modules/gallerix/js/common.js?b
Line 108 of common.js:
"var json = eval('('+ content +')');"
For exception list, I found a solution! I add this line to exception list: "gallerix/*" and its works!
Comment #9
mikeytown2 commentedah that makes since, it's doing a ajax call back under the path gallerix.
Sounds like the module creator baked in the ### code fairly heavily... Re-download a fresh copy to undo the patch I gave you. Try this one
Comment #10
superfedya commentedLine:108
Char:3
Code:0
Error:Invalid character
URL:http://localhost/site/modules/gallerix/js/common.js?4
But ok, no problem, I add gallerix to my exception list.
Comment #11
mikeytown2 commentedAll I can say is wow... Here's the javascript code
This code is the source of the issue
var content = data.substring(begin + 14, end);The 14 number needs to be adjusted; or the end offset needs to be adjusted to the end atjson.remainder = data.substring(end + 12);I'm moving this over to the gallerix issue tracker.
http://drupal.org/project/issues/gallerix
Disable ajax caching in boost
Comment #12
AlexisWilke commentedIt seems to me that the substring() is currently correct (unless we'd need end - 1 to remove the '#'? but substring() does not include the character pointed by end so I do think we're good.). However, I do not think we need the delimiters if we use the proper header. At this time, just changing the header breaks in my version (i.e. patch in #3).
At some point, I'll test without that ugly header and see if it works for me. If there is still a problem with other modules, we'll have to find a cleaner solution anyway.
Thank you for your research information.
Alexis Wilke