Posted by goldoak jp on December 23, 2008 at 8:40am
16 followers
Jump to:
| Project: | Jquery Slideshow |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Trying to get jquery_slideshow working on a dev site:
http://dev.lakecountryjournal.com/node/159
Instead of getting a slideshow, I'm just getting the images stacked one after the other.
Using:
- jquery_slideshow 5.x-1.2,
- imagecache 5.x-2.2,
- imagefield 5.x-2.1,
- jquery_plugins 5.x-1.3,
- jquery_update 5.x-2.0 (jquery version 1.2.6),
- drupal 5.14.
Made imagecache preset for images; slideshow settings are set to use preset.
Content type display field configuration set to "JQuery Slideshow" for full page view.
What am I missing? Any ideas?
Thanks
Comments
#1
jquery_plugins 5.x-1.3 does not include the cycle plugin by default. See http://drupal.org/node/328641 for an explanation.
You need to copy the file
http://www.shanestillwell.com/files/drupal/jquery.cycle.min.js
To your modules/jquery_plugin/ directory.
This should fix the problem. I really like your site, I live in Cloquet.
#2
I have the same issue. I uploaded the missing JS file but it did not fix the problem
#3
ok ... now the issue is that it will not rotate the images and the image that does display is floating as if the CSS were wrong.
UPDATE: It is rotating the images after a few hard refreshes but it floats the image incorrectly. Could this be a CSS issue?
UPDATE: It ended up that there was CSS embedded in the jquery.cycle.min.js file, once I change the position from "absolute" to "relative" it fixed the flotation error but the transition is not smooth like in the example. Note: You do not have to change the CSS anymore if you experience this problem.
Any ideas?
UPDATE: Figured it out ... I had to add a Height in the Imagecache setting for Scale. I did change back the CSS for the JS file to its original setting.
#4
#5
Automatically closed -- issue fixed for two weeks with no activity.
#6
I have this problem in Internet Explorer - the images are stacked and there is a javascript error. It works fine in Firefox
I see that one of the example sites on the project page also has this issue, but the one with the motorcycle displays ok in IE.
#7
Alright, same issue as dortez's I guess. I had put in 100% for height for scale in image, and when I looked at the source code of the page I see "100%px" for jquery slideshow's code... setting the height value to a pixel value instead of % in imagecache for the scale option fixed the problem in IE.
#8
Thanks for catching that.
#10
Works for me too, thank you!
#11
I have the same issue (http://www.slangenboren-online.nl/Slideshow-test4) I think I followed the advice:
Now it does rotate in FF, but the other problems persist: In IE, pictures are stacked and don't rotate. Both in FF and IE, images are displayed on top of surrounding text.
Can someone please be a bit more specific? I guess I'm simply overlooking something.
Thanks already!
Jeroen Strompf
#12
I had a similar issue. To solve the issue I found i had to give the imagecache a height and a width and I also aplied this patch
http://drupal.org/node/599190
Hope this helps
#13
There is a problem in the (6.x-1.2) function which gets the appropriate image width and height. It's probably the same thing in the Drupal 5 version and causes an javascript error on IE:
function _jquery_slideshow_get_actions($preset) {
$data = array();
// Imagecache 1.x
if (function_exists('_imagecache_actions_get_by_presetid')) {
$presetid = array_search($preset, _jquery_slideshow_get_presets());
$presets = _imagecache_actions_get_by_presetid($presetid);
$data['height'] = $presets[$presetid-1]['data']['height'];
$data['width'] = $presets[$presetid-1]['data']['width'];
}
// Imagecache 2.x
if (function_exists('imagecache_presets')) {
$preset = imagecache_preset_by_name($preset);
<strong>$data['width'] = $preset['actions'][0]['data']['width'];</strong>
<strong>$data['height'] = $preset['actions'][0]['data']['height'];</strong>
}
return $data;
}
The function assumes the data is stored in the first array item [0]. But this is not necessary true. You could for example have a canvas action first and then scale and crop or something.
I think the best way would be to adjust this function and make it search the whole array for the last occurence of a [width] and [height].
In my case, having scale and crop as the first action instead of the second fixed the error. (which only occured in Internet Explorer by the way)
Here is a dump of (an example_ imagecache $presets array for reference, in this case with three actions (scale and crop, png and rounded corners).
Array
(
[presetid] => 1
[presetname] => m
[actions] => Array
(
[0] => Array
(
[actionid] => 1
[presetid] => 1
[weight] => -10
[module] => imagecache
[action] => imagecache_scale_and_crop
[data] => Array
(
[width] => 363
[height] => 200
)
)
[1] => Array
(
[actionid] => 5
[presetid] => 1
[weight] => -9
[module] => imagecache_coloractions
[action] => imagecache_convert
[data] => Array
(
[format] => image/png
)
)
[2] => Array
(
[actionid] => 6
[presetid] => 1
[weight] => -8
[module] => imagecache_canvasactions
[action] => canvasactions_roundedcorners
[data] => Array
(
[radius] => 10
[independent_corners_set] => Array
(
[independent_corners] => 0
[radii] => Array
(
[tl] =>
[tr] =>
[bl] =>
[br] =>
)
)
[antialias] => 1
)
)
)
[storage] => 0
)
#14
@askibinski, I agree, the current way it's set up is a kind of a hack, it's hard coded to look at the first action. The problem is that the slideshow needs to know the width/height of the preset and I don't know of an efficient way to look for the width/height in the array, except to hard code it to look at the first action.
It was one of the compromises I had to make putting this module together, I didn't like doing it, but as of yet, I don't know of a better way. If someone has ideas I'd love to hear them.
Maybe a foreach looking for a data/width,height key in the array.
#15
Hello nvoyageur,
How is the dev' going? Any chance of a fix as mentioned above, foreach looking for a data/width,height key in the array.
I am running 6.x-1.2 and still a bugger in IE unless you change the imagecache to px. I would love to 100% height so as to fluid/tidy my div heights.
Look forward.
#16
Hello nvoyageur,
I've had the same issue with stacked images in IE 6/7/8. Using a fixed height and width solved this problem initally but now the stacked images have returned while no changes have been made to the Imagecache preset.
Am I the only one facing this phenomenon?
What has happened here?
I am looking forward to your reaction
#17
anyone?
#18
Thanks a lot #7 Sansui. It worked for me.
#19
It worked for me. In file modules/jquery_slideshow/jquery_slideshow.js
In the line 7 delete the texts +'px'
like this
.css({height: options.height , width: options.width })
the style works and avoids the problem of "%px"
bye
#20
I am still having major issues with this, as the images still stack in all the browsers. The CSS pixels vs percentage is not my problem. My Firefox error console says that the .cycle is not a function.
Full error message is here:
$('#' + id + ':not(".jqueryslideshow-processed")', context)
.addClass('jqueryslideshow-processed')
.css({height: options.height, width: options.width})
.cycle is not a function.
I have put the jquery.cycle.min.js file in every conceivable place. I put it in the Jquery Slideshow folder, the Jquery Update folder, and the Jquery Plugin folder.
Any help would be appreciated. This is the 10th slideshow module I'm trying to get working, and all have failed before this. I would love to get this working.
#21
Subscribing, greetings, Martijn
#22
In case of creating image cache with fixed values:
If you delete the 'px' in jquery_slideshow.js, images are not displayed in Firefox anymore.
So, sometimes we should keep the "px" and sometimes not (when we have '%').
oana