Hi, i'm trying to figure out how the Slideshow_Creator module is working and discovered it's not working with my Drupal 6.22
installation.
I'm using the latest Slideshow_Creator:
version = "6.x-1.35"
core = "6.x"
project = "slideshow_creator"
datestamp = "1292131537"
The Problem
I've created nodes and blocks with slideshows of about 10 photos. This is the code I used:
[slideshow: 2, img=|sites/default/files/foto/slide/01.jpg|||||, img=|sites/default/files/foto/slide/02.jpg|||||, img=|sites/default/files/foto/slide/03.jpg|||||, img=|sites/default/files/foto/slide/04.jpg|||||, img=|sites/default/files/foto/slide/05.jpg|||||, img=|sites/default/files/foto/slide/06.jpg|||||, img=|sites/default/files/foto/slide/07.jpg|||||, img=|sites/default/files/foto/slide/08.png|||||, img=|sites/default/files/foto/slide/09.jpg|||||, img=|sites/default/files/foto/slide/10.png|||||]
This works pretty good at the first time I load the page but as soon as I leave the page with the slide or visit another page with the same slide, it's screwed up. All images are shown one below the other.
I've spend some time to find out what's happening and I noticed the .css
- and .js
-files of the Slideshow_Creator and jQuery_Plugin are not added to the page.
Possible workaround
I was looking within the code for the function that adds these files to the page and noticed they where added with theme_slideshow_creator()
-function within the slideshow_creator.inc
-file at lines 281-286.
// Add the CSS file
drupal_add_css(drupal_get_path('module', 'slideshow_creator') . '/slideshow_creator.css');
// Add the main JavaScript, that does all the magic
drupal_add_js(drupal_get_path('module', 'slideshow_creator') . '/slideshow_creator.js');
drupal_add_js(drupal_get_path('module', 'jquery_plugin') . '/jquery.cycle.min.js');
I created a hook_init()
-function at top of slideshow_creator.module
adding these lines permanently to find out if this helps. (I know this is a pretty dirty workaround.) But it didn't work. The CSS/JS got added to any page now and the CSS seems to work, but the slide only shows the first image and does not do anything.
Not sure what else I can try.
Is there anything I can do? Is this a known issue?
- I've been reading README.txt and documentation closely.
- I even tried the example code:
[slideshow: 2, img=|http://drupal.org/sites/all/themes/bluebeach/logos/drupal.org.png|drupal.org|Drupal|The ultimate CMS. Download it now!|Drupal|, img=|http://www.mysql.com/common/logos/mysql_100x52-64.gif|http://www.mysql.com|MySQL|Free and reliable SQL server and client.|_self|, dir=|files/|yes||Generic Photos|Aren't they great?||]
- same problem.
- I also tried to disable my customized theme and used Garland - same problem.
I may have some more time to search the code but do you have a hint where to look at?
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#18 | page-reload-fix-1182302-17.patch | 4.82 KB | rhouse |
#6 | header.txt | 34.73 KB | donSchoe |
Comments
Comment #1
donSchoe CreditAttribution: donSchoe commentedactually this is critical as the module is broken.
and i just noticed this is a known issue #1160842: overlay:hidden not honored on cached page?, sorry for creating a new one.
Comment #2
rhouse CreditAttribution: rhouse commentedI am also using this core version and this slideshow creator version, and I cannot see any problems. You might like to look at any of the many dozens of pages of http://wingedhearts.org and see if you can break any of the slideshows there. It might be that I am not using the exact feature of the module that causes the breakage. It was because I need it for that site that I volunteered to maintain the module, but I didn't write it and I might be misunderstanding something that it is doing, so if you can find the difference between how I use it and how you are using it, so I can test it better, that would be very helpful.
Here are some pages at random:
http://wingedhearts.org/featherytales/ft7
http://wingedhearts.org/thestickybeak/st3
Comment #3
rhouse CreditAttribution: rhouse commentedDon, I've just noticed something on your sample slideshow. When I hover over a next link on my site, I see this:
On page: http://wingedhearts.org/featherytales/ft7
I see: http://wingedhearts.org/featherytales/ft7?ssc=1,2
But with your test site:
On page: https://www.acceleratecarboncapture.org/drupal/public/slideshow-test-page
I see: https://www.acceleratecarboncapture.org/drupal/category/tags/public?ssc=1,2
I wonder if there is something like the site base url or something else that is messing things up?
Comment #4
donSchoe CreditAttribution: donSchoe commentedHi,
I haven't been around for the weekend and didn't change anything. I've tested the module with another Drupal 6.22 installation and it's the same problem. http://141.45.160.88/node/3
It displays all pictures at once and the "next" links are not working.
The ACC is not my site.
But indeed it's strange, this one is not working: https://www.acceleratecarboncapture.org/drupal/public/slideshow-test-page but this one is: https://www.acceleratecarboncapture.org/drupal/welcomeThe working slide is an animated PNG-file.Would be interesting to find out how calaf fixed this!Comment #5
donSchoe CreditAttribution: donSchoe commentedThis code:
On 3 different Drupal 6.22 installations:
To avoid problem with my own code, I also added the code from the documentation at all 3 sites:
It's not working at all, and: always the same problem: CSS + JS not added to page header. Now, we need to find out why.
It would be really interesting to have a look at a site where it is working.
Comment #6
donSchoe CreditAttribution: donSchoe commentedI've been looking into the module and comparing the headers of all the sites linked above. (See attached file.)
Results
slideshow_creator_init()
) does not fix the problem. Only CSS is added correctly, but the JS is not working.theme_slideshow_creator($ss)
(lines 281-286 of slideshow_creator.inc). This might be the problem. When and how often are theming functions called?Comment #7
rhouse CreditAttribution: rhouse commentedGosh this is a real puzzle. I am swamped with other jobs just now, but I have turned off all optimisations on wingedhearts.org temporarily, so you should be able to investigate what js is loaded. A quick look, I see it is there. But why it is and yours isn't I just don't know. If I could simulate the problem I might have half a chance at fixing it. I'll go through all your suggestions carefully soon, but unless I can reproduce the bug I won't know if any changes I make are doing any good.
BTW, where are the sites hosted? I know godaddy breaks drupal for sure. Again, I don't know why, I just know i had to change hosting company. (Currently with Hotdrupal - extremely good service and site responsiveness.)
Comment #8
rhouse CreditAttribution: rhouse commentedThe other thought I had: the order of the input filters. This is the order on wingedhearts.org:
HTML Corrector
Internal Path Filter
Paging
Slideshow Creator
URL filter
Comment #9
rhouse CreditAttribution: rhouse commentedFrom @4: the test page did indeed work on Sunday, and not because I was fooled by an animated gif. Then it stopped working by Monday.
Comment #10
donSchoe CreditAttribution: donSchoe commented@#7: the sites are all hosted at my university but on different server setups. i could try to setup one at my private server.
@#8: I tried to change this order (moved URL filter to bottom, etc.) but it didn't change anything. My initial setup:
@#9: I just opened my slide and: it worked!!! But as soon as you reload the page it's broken again. Seems pretty much to be a caching problem.
And yes, indeed, as soon as I empty chache (admin/settings/performance) the slide works again but only once. My performance settings are:
Changing these settings did not change the behaviour of the page. It's still working only on first visit.
We need to find out how to force that drupal loads the code on any page load. But it's still confusing why it is working with your site :)
Comment #11
rhouse CreditAttribution: rhouse commentedMy settings:
Caching mode: works both ways
Minimum cache lifetime: none
Page compression: enabled
Block cache: works both ways
Optimize CSS files: works both ways
Optimize JavaScript files: works both ways
Since my site is bulletproof to changes in the performance settings, I think the problem is somewhere else.
The puzzling thing is that each page load is a separate operation, so how can it know that the page was loaded before?
More details: Using linux, debian, apache2.
Comment #12
donSchoe CreditAttribution: donSchoe commentedThat's confusing.
Okay. Either
The servers I'm using:
2x InterWorks dedicated servers, virtual, linux
1x I dont know ;)
I'll try another server type a.s.a.p.
Comment #13
rhouse CreditAttribution: rhouse commentedOkay, it doesn't seem to be filter order, performance settings, or site base url setting. Both sites use linux. Are they both using apache2? Perhaps there is a dependency on a particular apache mod? On my test box I am running, my listing for /etc/apache2/mods-enabled is:
alias.conf@ authz_default.load@ autoindex.conf@ deflate.load@ mime.conf@ perl.load@ rewrite.load@ status.load@
alias.load@ authz_groupfile.load@ autoindex.load@ dir.conf@ mime.load@ php5.conf@ setenvif.conf@
auth_basic.load@ authz_host.load@ cgi.load@ dir.load@ negotiation.conf@ php5.load@ setenvif.load@
authn_file.load@ authz_user.load@ deflate.conf@ env.load@ negotiation.load@ python.load@ status.conf@
I don't know what the production site is running, but as things work fine there I haven't asked. If you have any extras not in this list, or any missing modes that I have present, I'll try swapping mods in or out one at a time to see if I can break my test site.
Comment #14
donSchoe CreditAttribution: donSchoe commentedMy main problem is I only have limited access to the servers I use so it's hard to provide full information about the setup.
But this problem is hihgly reproducable. 4th try with a complete different server: http://sandbox.schoedon.nl/6/node/1
Comment #15
rhouse CreditAttribution: rhouse commentedOkay, what exact steps did you take to make that site - which modules, which versions? I'll try to reproduce.
Also please list the exact slideshow filter text you used to display that slideshow, just in case it is some overlooked problem in there.
Comment #16
donSchoe CreditAttribution: donSchoe commented... and using input type "Full HTML"
That's it. I didn't touch any settings.
Comment #17
rhouse CreditAttribution: rhouse commentedThanks muchly, I'll follow those steps and see where it gets me. I'll post back my results.
Comment #18
rhouse CreditAttribution: rhouse commentedThe mysterious bug has been found! There is a variable called Drupal.settings that is supposed to convey information from the server to the javascript on the client. There is also a history of module maintainers tearing their hair out and going mad, and, incidentally, relying on Drupal.settings in their modules. It turns out Drupal caches information even when it says caching is turned off, and thus not all code on the server is recalculated, even with "no caching". This apparently can't be turned off, nor do we want to run every page with no caching. Sadly, the contents of Drupal.settings are never cached, so they are computed once when the page is first rendered and never again, but used only once and then thrown away.
Anyway, to avoid the fate awaiting any who struggle with Drupal.settings, I have rewritten the module to put the javascript settings into the html, where it can be evaluated once, cached, and retained for next time. Everything seems to go fine now, regardless of caching mode. To get it to you as quickly as possible, and also so you can get a chance to test it and give me feedback before I make a new version, here it is as a patch file on version 6x-1.35.
Comment #19
donSchoe CreditAttribution: donSchoe commentedpatch applied cleanly, slideshow working well! good work!
Comment #20
rhouse CreditAttribution: rhouse commentedThanks heaps, I guess it's time to put out a new version. (1.36?)