I have a content type called 'Article'. The article references a 'Photo' content type using node reference url. So the flow is, you create an article and add a photo as much as you want. The photos are injected into the article node template using module_invoke for ddblock ( typical ddblock reading a view that outputs CCK fields ). Everything is fine.... as long as I post more than one photo.

If I only post one photo, the DDblock advanced block doesn't activate for some reason. I looked at the HTML source and could see that all the correct elements had been populated with no diff between the markup from the multi source and the single source except that one was a set of multiple photos and the other was just the one.

So, if I have just the 1 slide, it never activates and the dreaded gray box is all thats there. I've run several debug cycles and can see that everything gets into the page itself so my assumption is that the javascript is having an issue of some kind based on the single element in the paging cycle block.

I've checked threads for jquery cycle plugin but don't see anything about this issue except one post where a person reviews the plugin and states that they HAD to use more than one image, which led me to believe this is perhaps an issue in the cycle plugin.

Just to be sure I wasn't crazy, I added another photo back to the Article and magically everything worked fine. Its like there's some object getting NULL'd and failing somewhere, but I can't find it.

I've tried this scenario with the tutorial based setups as well and get the same results. Any info would be appreciated.

Thanks,

-jj

Comments

JJustian132’s picture

Status: Active » Closed (fixed)

Got a confirmation... cycle requires 2 slides.

Thanks to:

http://drupal.org/user/155138

technikh’s picture

Status: Closed (fixed) » Active

is there no alternative for this? I really liked the module. I need to give slideshow support to my client. currently he has only 1 image but in future he may have more images.
any suggestions?

technikh’s picture

I don't know the purpose of display:none; in this context, but removing it worked for both cases(single & multiple images)

in div.ddblock-cycle-upright40 div.slide{display:none;height:100%;left:0;position:absolute;top:0;}
I removed display:none;

can anyone clarify why this worked and will this cause any problem in future?

ppblaauw’s picture

Status: Active » Needs review

The display:none is used to hide slides before the javascript for the slideshow starts.
It prevents that slides are shown below each other when loading more slides before the javascript is used.
The javascript will make slides visible.

When there is only one slide the javascript of the slideshow is not used and it will not change display:none, so nothing is shown.

In the dev version which will become the 1.0 version of ddblock this issue is solved.
Please test and review the dev version so a new 1.0 version can be released.

timbraeckman’s picture

@ppblauw:

I just updated to the latest dev version but it doesn't seem to fix the problem unfortunately.
Thanks for your great module!

ppblaauw’s picture

Status: Needs review » Postponed (maintainer needs more info)

#5

Do you have a link to the page where the slideshow should be?

There can also be a javascript issue which prevent the javascript of the ddblock module to be used.

timbraeckman’s picture

http://www.persgroeponline.be ... there you can see it. I have removed the display:none so now it works with 1 result too.
on http://www.persgroepadvertising.be you can see it working with more than 1 result.

Thanks!

ppblaauw’s picture

#7 I don't see the javascript code of the latest dev version on your site.
Maybe its a caching issue. (can you disable and enable the javascript optimization, or clear the cache)

timbraeckman’s picture

Do i just upload the ddblock module folder and run update.php ? Or do i have to update my themes files also?
Thanks for the support