Nodecarousel does seem to function semi-correctly, except Ajax loading doesn't seem to work at all in either the 5.x-1.x dev version or the 5.x-1.0 version. Firebug's Javascript debugger says it's getting an error: "nidmatch has no properties", and it lists this snippet of code:
fetchMoreCarousel_4(Object options=Object container=Object clip=Object, li.jcarousel-item, 1, "init")13563 (line 74)
(?)()jcarousel.js (line 762)
e(Object length=1 0=li.jcarousel-item prevObject=Object, function(), undefined)jquery.js (line 2)
e(function(), undefined)jquery.js (line 2)
callback("itemLastInCallback", "onAfterAnimation", "init", 1, undefined, undefined, undefined)jcarousel.js (line 762)
notify("onAfterAnimation")jcarousel.js (line 740)
scrolled()jcarousel.js (line 640)
animate(0, false)jcarousel.js (line 648)
scroll(1, false)jcarousel.js (line 484)
setup()jcarousel.js (line 205)
init()jcarousel.js (line 219)
jcarousel(ul#nc_default.jcarousel_target, Object visible=1 scroll=5 vertical=false wrap=null auto=0)jcarousel.js (line 174)
jcarousel()jcarousel.js (line 42)
e(Object length=1 0=ul#nc_default.jcarousel_target, function(), undefined)jquery.js (line 2)
e(function(), undefined)jquery.js (line 2)
jcarousel(Object visible=1 scroll=5 vertical=false wrap=null auto=0)jcarousel.js (line 41)
(?)()13563 (line 63)
e()jquery.js (line 2)
e()jquery.js (line 2)
e([function(), function(), function(), 2 more...], function(), undefined)jquery.js (line 2)
e()jquery.js (line 2)
[Break on this error] if (nidmatch.length) {
I haven't got a clue why that's happening or where to begin. Anyone offer any guidance?
Thanks,
Craig
Comments
Comment #1
Offlein commentedThis is actually a support request, I think.
After more testing, if I call the block on the homepage of my site, it displays okay. It seems like it's the fact that there's a node being displayed that hijacks it, or something.
Comment #2
jonahan commentedI was getting this too, but changed the wrap style from Circular to something else and I made some progress. I think I remember reading somewhere that the circular wrap doesn't work in the 5.x version... ?
Comment #3
jonahan commentedStrange: I had it working for a while, then it inexplicably quit. I get the same error as you stated, and no AJAX functionality. The nodes change, but they don't slide.
Not sure what I changed to cause this (if anything), I tried going backwards and disabling modules that I may have added after getting nodecarousel working properly, but no dice.
Puzzler. :-\
Comment #4
jonahan commentedOk, a little more info...
When 'Data Collection' is set to static I don't get the "nidmatch has no properties" error. I still don't get the AJAX transition however.
Comment #5
jcfiala commentedHum.
Question: Do you get this error on pages which display a node? (ie, you go to node/12, say, do you still get it?) Which theme are you using?
Second question:
If you are getting the nodecarousel to scroll, but it's not animated, what have you set the 'Animation Speed' for the carousel?
Comment #6
jonahan commentedI am an idiot: it was the scrolling speed.
I had it set at '2', which is in milliseconds. I must have thought it was in seconds.
Thanks again, I owe you for these silly problems!
Comment #7
jcfiala commentedWell, you've still got your 'nidmatch' problem, so I ask again:
Question: Do you get this error on pages which display a node? (ie, you go to node/12, say, do you still get it?) Which theme are you using?
Comment #8
jupiterchild commentedHi there,
First of all I'd like to thank you for a great module, this is exactly what I have been looking for and see tremendous potential for its use.
I've posted under this issue but my request is a little broader.
I seem to have hit upon a few problems and despite having read through all the issues I still cannot find an answer.
The only combination of Nodecarousel, jCarousel and Jquery Update I could get to work is shown below.
I'm not a coder and I'm wondering if my theme overide is causing the problem. I want to display a 'story' type node with teaser that includes an embedded gallery module image pulled from Gallery2 using the gallery filter. The overide works OK and displays OK but at the end of the sequence of 6 nodes it hangs for several minutes then continues through the sequence again. You will see from the Firebug report (edited for brevity!) that it continues past 6 items all the way to 25 before starting again at 1. Curiously I see some lines contain li.first, 2, "next") and some li.taxonomy_term_2298, 3, "next"). Each line has a nidmatch has no properties error.
If I switch to static data collection no errors are reported but it still hangs for several minutes before the carousel repeats.
Any ideas on what is happening during the long interval between the carousel sequences?
Drupal 5.7
jCarousel 5.x-1.2
jQuery Update 5.x-1.0
Nodecarousel 5.x-1.x-dev
JQuery Update Installed correctly
The current installed version of JQuery is 1.1.2
Using Node Queue = France with 6 items in queue
node source = node queue
nodequeue source = France
sort order = node queue order
sort order = ascending
data collection = dynamic
number to fetch = 6
orientation = horizontal
wrap style = from last return to first
auto scroll = 5
index display = no index
number visible = 1
start position = 1
number to scroll by = 1
animation speed = slow
auto load on page load = yes
theme overide:
function phptemplate_nodecarousel_node($node, $teaser, $name='') {
$content = '
$content .= '
';
$content .= ''. $node->nc_position .' of '. $node->nc_total .'';
$content .= '
';
return $content;
}
Firebug report:
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.nc_item_France, 1, "init")welcome2 (line 79)
(no name)()jcarousel.js (line 762)
e([li.nc_item_France], function(), undefined)jquery.js (line 2)
e(function(), undefined)jquery.js (line 2)
callback("itemLastInCallback", "onAfterAnimation", "init", 1, undefined, undefined, undefined)jcarousel.js (line 762)
notify("onAfterAnimation")jcarousel.js (line 740)
scrolled()jcarousel.js (line 640)
animate(0, false)jcarousel.js (line 648)
scroll(1, false)jcarousel.js (line 484)
setup()jcarousel.js (line 205)
init()jcarousel.js (line 219)
jcarousel(ul#nc_France.jcarousel_target, Object visible=1 scroll=1 vertical=false wrap=last auto=5)jcarousel.js (line 174)
jcarousel()jcarousel.js (line 42)
e([ul#nc_France.jcarousel_target], function(), undefined)jquery.js (line 2)
e(function(), undefined)jquery.js (line 2)
jcarousel(Object visible=1 scroll=1 vertical=false wrap=last auto=5)jcarousel.js (line 41)
nc_load_France()welcome2 (line 65)
(no name)()welcome2 (line 68)
e()jquery.js (line 2)
e()jquery.js (line 2)
e([function(), function(), function()], function(), undefined)jquery.js (line 2)
e()jquery.js (line 2)
[Break on this error] if (nidmatch.length) {
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.first, 2, "next")
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.taxonomy_term_2298, 3, "next")
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.last, 4, "next")
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.nc_item_France, 5, "next")
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.first, 6, "next")
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.taxonomy_term_2275, 7, "next")
(here on some lines edited for brevity)
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.taxonomy_term_2271, 20, "next")
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.last, 25, "next")
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.nc_item_France, 1, "prev")
nidmatch has no properties
fetchMoreCarousel_9(Object options=Object container=[1] clip=[1] list=[1], li.first, 2, "next")
Comment #9
jcfiala commentedI've got a general idea of what's going on, and I plan to address it as soon as I can.
Comment #10
Offlein commentedGentlemen (and ladies..?), the acclaimed David Strauss of the fantastic Four Kitchen Studios has figured this one out for me.
I should explain that after doing further research, I determined this error occurred ONLY on pages where Nodes are loaded. That is, if I threw it right onto our homepage, it would load correctly and make dynamic calls correctly.
The nidmatch bug was being caused (in my case) because the code (the jCarousel part, I think) was hard-coded to seek a "node-XXX" ID in a
I understand that this is apparently a common practice to include this, but everyone's themes are different. It should be noted that this is a requirement in the module's documentation, or the module should not require this sort of thing.
And even if it does, it should degrade more gracefully than it currently does.
Please let me know if this applies to anyone else's circumstances.
Comment #11
jcfiala commentedYeah, that's what I was thinking. I'm planning on taking care of that in the near future with the module. Thanks for bringing it to my attention!
Comment #12
jupiterchild commentedThe weird behaviour (hanging between carousel wraps) turns out to be the encapsulated taxonomy of the 'wrapped' node. Once I figured to tweak node.tpl to NOT '$print terms' (which anyway I did not want, but not being a coder was struggling to achieve) for a specific nodecarousel page the problem goes away. The 'nidmatch' problem still exists when using Dynamic data collection, and both Circular wrap and the Random sort order seem not to work, but for me it now does exactly what I wish for.
Comment #13
cybertoast commentedThanks to jewcycraig (post #10) there are a couple of ways around this problem:
Solution 1: Change the nodecarousel.module source
Add some logic to the nodecarousel.module file to fix the problem:
In function _nodecarousel_create_callback_javascript($nc), add a conditional check around where the nidmatch occurs:
Solution 2: Change your theme (probably better)
Alternatively/additionally), the fix can be made in the node.tpl.php file by adding an id to every node:
The addition is id="node-<?php print $node->nid; ?>"
Comment #14
xamountRegarding the solution for comment #13...that is solution 2.
The $node->nid is already in node.tpl.php by default.
See http://drupal.org/node/11816
Look for the section "Default template for 5.x"
That solution still does not work by the way.
Comment #15
avpadernoI am closing this issue, as it's for a release that is now not supported.