More than one slider node type causes errors on all nodes
jshubow - February 19, 2009 - 15:08
| Project: | Slider |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Mark Theunissen |
| Status: | closed |
Jump to:
Description
I'm getting "An error has occurred while trying to create this slider" but not seeing anything wrong or seeing any log errors. What would cause this and where can I get more info on the exact nature of the error??

#1
That message is displayed when the Slider has no attached nodes. Either that, or you've named the nodereference field incorrectly. Check to see if you've followed the instructions.
#2
Hmmm. I *think* I followed everthing correctly. I'm getting the message on all nodes, even ones that have nothing to do with the slider.. Slider has 3 stories works fine with images or stories
here is what I have in the manage fields page for the content type:
Slider _add_new_group field_slider_content Node reference Configure Remove
Any help would be appreciated.
Also will this work with a block?
#3
Also when trying to get it to show up on the homepage I get the info about the slider, not the slider.
Featured Slider
February 19, 2009 - 2:53pm — Jonathan Shubow Slider:
Culmination of a lifetime of work
South Shore Inaugural Ball
Teen voices from the Obama inauguration
#4
You can't display a Slider as a teaser, so that's what your second issue is.
As for the first, I simply don't know. As long as you have a field_slider_content that is a nodereference, you shouldn't get the error.
#5
Never mind, think I've found the problem!
I fixed it in today's -dev tarball, can you confirm it's working please?
#6
Nope, sorry.
Downloaded, installed, updated, cleared cache.... getting it on all nodes, no matter if slider enabled or not... new drupal installation.
I'm happy to give you access. I sent you my email address.
#7
Are you still getting the same error message? Or has it changed?
#8
Wait, I think I know what may be causing this. If you go to admin/settings/slider, which node types are ticked?
You should only have the *slider* node type selected. You shouldn't select page, story, or any others (ie. the ones that you want to appear as slides within the slider). Because then the system will attempt to turn them into sliders, which will fail.
However, thinking about it, the module shouldn't let you anyway.
#9
Due to PHP's in_array() function not behaving sanely (i.e. returning true when comparing integer 0 to any string), the following line breaks if you have more than 1 slider node type:
if (in_array($node->type, $slider_types)) {
You actually need to force "strict mode" and thus the line becomes:
if (in_array($node->type, $slider_types, TRUE)) {
http://venutip.com/content/assumptions-and-errata-two-quick-tips
Will be in the 1.3 release.
#10
Automatically closed -- issue fixed for 2 weeks with no activity.