Everything was great after I first installed this wonderful module couple months ago. But I recently noticed that the auto handling does not work anymore in most of the nodes. I cannot tell when was this happened since I have not tried this feature for a while.
I have enabled "Enable for all image links" and "Enable shadowbox globally" options. The strange thing is it dose work in some page of my website, like the flickr galleries: http://www.wmuconfucius.org/flickr. But they won't work if I disabled the "Enable for all image links" and "Enable shadowbox globally" options.
And in other place, any other nodes, there is no effect, just lead me to the raw image: http://www.wmuconfucius.org/node/179
But if I and a rel="shadowbox" after the image herf. Then the shadowbox showed up, like the third image in the page I posted above.
Please help me out of here!
Thank you very much in advance!!
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | shadowbox-autohandle_images_not_working-1949498-7.patch | 713 bytes | manfer |
Comments
Comment #1
manfer commentedUpdate to 7.x-3.0-rc1 and report back please.
As you are using in your site aggregate JS files please don't forget after the update to clear cache in admin/config/development/performance to be sure the new versions of the files are loaded.
After you have updated report back and I will check again that node where shadowbox doesn't work.
Regards.
Comment #2
jiangleo commentedHi manfer,
Thank you for your reply. I have tried cache clear, no luck. And I also tried to disable "Aggregate and compress CSS file" and
"Aggregate JavaScript files", still doesn't work.
Comment #3
manfer commentedBut you haven't updated shadowbox. Update shadowbox to version 7.x-3.0-rc1 released yesterday.
You don't need to disable aggregate JS. Just clear cache on performance configuration after update.
Comment #4
jiangleo commentedHi I just upgraded it to 3.0-rc1, then did database update, cache clear. But now all the images in my website do not the shadowbox effect. Even the flickr galleries and the images I added the rel="shadowbox" are not working now...
Thank you again for your help!
Comment #5
manfer commentedWorks same as previously. You just have to wait till the page is fully loaded. If you click before the page finishes loading then the shadowbox effect is still not available. As for my test it works on your galleries and on the node (the images with the rel) as before. But still seems the auto handling is not working.
Your website is a little heavy in terms of javascript, I noticed that already yesterday. It would be great if you can review that before trying to find out what is happening with the auto handling.
For example I suggest you review why in your website google analytics javascript, ga.js file, is being loaded 26 times in the header. Once should be enough.
There is too a javascript error from a javascript file loaded from s.yimg.com, which I bet is flicker javascript. I suppose that is not the problem anyway. Though maybe you can check if there is an updated version without that javascript error.
Probably if you solve the ga.js problem is enough to make the site render faster and that way will be easier to analyze further.
Anyway I will check again later and if I find anything else I will reply again.
Comment #6
jiangleo commentedHi manfer,
Thank you so much for your response! I do appreciate! Yes, I did notice that my website is kind of heavy feeling but did not get chance to take it seriously. I will start to face the problem right away. I will keep this updated!
Comment #7
manfer commentedThe following patch should solve this issue.
Comment #8
manfer commentedThis was actually a bug. I have pushed the patch that fixes it to 7.x-4.x and 7.x-3.x branches. Soon I will release a new version of the module.
Comment #9
mee_sha commentedFor me the error still exists with 3.0 rc2 and 4.x on D7.
No rel-Attribute added - no Shadowbox.
I figured out that shadowbox_auto.js depends on jQuery Update, because the method attr() requires at least jQuery 1.6.
So i modified the code instead of installing Jquery Update, as this Module is known to produce additional errors on other positions.
This is my code, as I do not need the rel attribute on image links elsewhere (original code is commented):
Perhaps this helps someone till a patch comes out.
Beside that in SOME cases the linked images with manual set rel are counted twice. For example there are 4 Images in node, the counter displays "1/8".
Comment #10
manfer commentedIf there is a problem with the count then it is other issue, please open a different issue for it and add and example with the problem.
This auto handling bug is fixed with the patch on #7 and already pushed to the development branches 7.x-4.x and 7.x-3.x. It is not corrected on any realeased version.
What you say about attr is not true, that function is available since jQuery 1.0+. Please read jQuery documentation correctly:
http://api.jquery.com/attr/
Comment #11
mee_sha commentedYes, but it wasn't working in my case. I don't know if it's a Drupal issue on the included jQuery lib or whatever, but changing it to the native Javascript syntax got it to work fine, so I blamed jQuery for that misbehaviour.
Comment #12.0
(not verified) commentedupdated some detail