I'm trying to establish a Carousel style Pane on a Panels page for a picture gallery. I receive a pop-up that says, "Jcarousel: No width/height set for items. This will cause an infinite loop. Aborting ...". I was on a previous version of Jcarousel and updated to the latest release but still receive this pop-up. I searched for this particular issue but couldn't find where it was related to Panels Carousel specifically.

Comments

Project:Panels» Carousel Panel Style
Version:5.x-2.0-beta2» 5.x-1.x-dev
Component:Plugins - styles» Miscellaneous

Version:5.x-1.x-dev» 5.x-1.3

Updating the version ... it's actually 5.x-1.3 that I'm using where this problem is occurring.

Assigned:Unassigned» Wim Leers
Category:bug» support
Status:Active» Postponed (maintainer needs more info)

This is not a bug. It's by design. The jCarousel plugin (not written by me) requires your width and height to be set, or it won't work. It needs this to calculate the carousel sizes. I suppose you're trying to use a custom CSS file? Try to start from the default one.

I'm not trying to use a custom css file at all. I've gone through standard set up for Panels and added the Carousel option in Layout Settings. When I received the error, I did check the JCarousel style.css to make sure a height and width shows up. Both show as 75px. I tried making changes to that number but still I get the same result. I am on the latest version of JCarousel as well.

Any other ideas?

Perhaps a caching issue, if you've got CSS aggregation + page caching enabled: clear the entire page cache. (DELETE * FROM cache_page).

It's not appearing to be a caching issue. We did exactly what you suggested.

Any other ideas? Is there anything I can show you so you're better able to assess the problem?

Is this a live site perhaps?

Not live-live but getting ready to be on April 1st. It is sitting behind a firewall. I can get you a userid and password to access it if that would help. I'm really excited about the potential to use the carousel feature and would appreciate any help you can give.

I have this issue too, but somehow it only appears if I'm logged in. An anonymous user has no problems. I'll try to investigate more into this.

Anyone find a solution for this? The jcarousel css shows 75px as w/h . Is it somewhere else?

I'm also facing same problem.
I have set height and width of mini panel as follows.

.panels-mini-0 {
height:300px;
width:300px;
}

But still I'm getting error.
--
Sharique

FWIW ... I'm still working to track this down on my site. I think it is more of a nodecarousel/panels thing than specific to the style. I installed Carousel Panel Styles in a false hope of solving this problem with Panels and trying to place a nodecarousel block.

When I add the block to a page it works fine. Tried copying the css from jcarousel.css into the last file to load and haven't had success yet at getting it to work in a min-panel or a panel page.

This issue is also occurring on our site. Wim, if you state which of the jCarousel-related CSS classes needs to have absolute width & height for the jCarousel JavaScript to work, that would be massively helpful.

Is it the .jcarousel-container? I tried setting that to {width: 99px; height: 99px; } with no effect.

There are a lot of jcarousel classes in the skin.css file, but most of them don't appear to have height & width set or else they have it set in percentage or ems. I am using the default skin, which is how Panels beta 3 sets it up.

Looking at my test page, I saw the following error message in the Firebug console:

elem.style has no properties
e(Document trial, "position", undefined)jquery.js (line 2)
e(Document trial, "position")jquery.js (line 2)
e(undefined, undefined)jquery.dimensions... (line 10)
delayedActivate("http://www.urbanministryjobs.org/tag/jeremy-del-rio")jquery.faceted_se... (line 49)
(no name)()

The test page is called "trial" - I don't know whether this jquery error is related to the Carousel or not.

I wanted to add to my previous post that this only occurs when I am logged in, as per #9 above.

Related support request in nodecarousel support queue http://drupal.org/node/240558

One more FWIW... My most recent attempt with this led to the error message followed by a perfectly functional nodecarousel in a panel for authenticated and anonymous users alike.

Hey Guys, Just wanted to add myself to the group of those experiencing this problem and willing to help. I installed the drupal 5 dev version of nodecarousel, and am using a patched 1.2 jQuery, so I do have some extraneous variables in the mix. For the time being, however, I am getting the same error as those above with a pretty stock carousel only trying to display CCK created nodes with only a title, body, and one text field.

Thanks all,

Component:Miscellaneous» Code
Category:support» task
Priority:Normal» Critical
Status:Postponed (maintainer needs more info)» Active

I'll work on fixing this this weekend. Because there are so many confirmations of this problem, there *must* be an issue in the module itself I guess, and it can no longer be an issue in custom CSS.

I'll work on fixing this this weekend. Because there are so many confirmations of this problem, there *must* be an issue in the module itself I guess, and it can no longer be an issue in custom CSS.

So I did some good old-fashioned detective work this morning and made a few discoveries.

First, I only get this alert message when I am in the "content" tab of the panels management. When I am previewing the page logged in, or viewing it normally logged out, it is fine. I don't have much knowledge about the panels module's inner workings, but my guess is that since the content tab is rife with JS for the drag and drop, this is somehow overriding the width and height that the node would normally have. I'm not sure of the fix for this, but it could be to just ignore the jCarousel effect when in that tab, as you probably don't care about seeing the animation unless you are previewing it anyhow.

Unfortunately, I also found out that the "circular" animation style for this module is not quite working in the drupal 5 version, and with autoscroll isn't even working in the drupal 6 version. So, this means I will need to roll up my jQuery sleeves and dust off my "Drupal for Pros" book and make my own little module. My needs are pretty straightforward, I am trying to display a rotation of "notices" (mostly links to other content).

I look forward to Wim's further discoveries on this problem and the maturing of this module in general so I can put it into play on future sites.

Well done te-brian. That's appreciated. ;)

1) Your assumption is right: because it's initially hidden (thus no width/height), you'll get this error. IIRC though, I added some code to circumvent this problem. If the problem really only exists in the "content" tab, then I'm not worried at all to be honest.

2) I've seen reports of this before. I'll look into that closer.

3) Drupal 6? You're using this module with Drupal 6? How is that possible, if Panels is not even ported to Drupal 6?

This module actually *is* mature, except for a couple of things:
- some cross-browser issues, which are bugs in the underlying jQuery plugin, which is not written by me
- some possible small bugs: circular scroll and auto scroll (i.e. bugs that I can, should and will fix)

On further testing, I have determined that the jCarousel Panel functions normally both when viewing it as an anonymous user and as an authenticated user. The "no width/height set" error appears when I view it as an administrative user (one with privileges to administer all the modules installed on my test site).

There are a significant number of js-intensive modules installed on our test site, so I'm not sure which one is causing the interference. If I have some time tonight, I'll try to make a list of the jstools & jQuery-related modules that we have installed.

For this testing, I was using a jCarousel mini-panel in the left sidebar of the Garland theme.

Glad to Help,

1) I'm not too worried about this either, if you were able to circumvent th alert message on the content tab, then that fixes the only major error I encountered.

2) Assuming you were referring to auto-scroll, then yeah, I'd love to see it working. Thats' really the only thing holding me back from using it in more than a few places.

3) Sorry for any confusion, I am using Drupal 5.7 (this site [to be revealed later with some case study hopefully] is going to be receiving lots of traffic so theres no room for experimental/dev modules. I guess I was alluding to the fact that the 5 version was more complete than the 6 version, but to be honest, I don't even remember what I was trying to get at.

I look forward to seeing the auto-scroll working with circular. Let me know if I can give you any testing assistance.

In the end, I may end up having to roll-my-own anyhow. I am going to be implementing a "features" rotator that may have an image-link, some html, form elements, flash, etc. Really anything. I'm hoping NodeCarousel will be able to take everything I throw at it but time will tell.

Another FWIW tidbit... when I added a plain text node to the carousel (not in panels) at http://w.cali.org I got the same error when visiting that panel of the carousel. From the last panel on the carousel it's evident that it works perfectly with a node that has mixed text-graphic or only graphics. So it's not Carousel Panel related directly but in case it helps in any way with analyzing the problem.

I have this issue too,

For me it happens when logged out in addition to when logged in, and it occurs in all the preview and actual pages. Still trying various panels 2 tutorials to make some sense of it all.

Drew

Same here

It's working on our live site now, no matter what theme we're in: www.urbanministry.org/section/frontpage (a test page). For us, at least, I think it was a module compatibility issue. Not sure what was different between the two sites, however.

This is actually fixed in the latest panels-5.x-2.x-dev, because content previews have been removed altogether (perhaps permanently - see http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/panels/incl...)

You can also work around this by forcing the previews by adding this snipped to your themes css:

  .panel-pane .content {
    display: block !important;
  }

I had this issue on a site when I didn't fill in any text for the back/forwards buttons as I didn't want to use them. Those fields should be labeled as required.

We saw this issue on a site which had not fully completed installation of the jquery_update module, namely ensuring that misc/jquery.js is replaced with sites/all/modules/jquery_update/misc/jquery.js

While the jquery_update module recommends doing this by copying the updated jquery.js into place, we do this with a Redirect entry in the virtualhost config, so as not to interfere with other sites on the same multisite Drupal.

eg,

        Redirect /misc/jquery.js http://www.paperfish.co.nz/sites/all/modules/jquery_update/misc/jquery.js

HTH

you fix this by adding a width and height in the core css for jcarousel

/jcarousel/lib/jquery.jcarousel.css

search for:

.jcarousel-list li,
.jcarousel-item {

add a fixed height and width. problem solved.

and no jcarousel does not support fluid items.

Solution?! I realize I've copied only misc/*.js files without misc/farbtastic/ folder! When I copy over this missing folder everything starts to work again :).

I thing the jquery_update README.txt file is not clear enough. It says:

3) Copy all *.js files from the jquery_update/misc folder and place them in
Drupal core's misc/ folder, replacing the files that already exist.

So if You just do it (under linux box) cp *.js /dir/to/drupal/misc/ it will copy all js files without farbtastic dir! So jjeff (http://drupal.org/user/17190) should update this file.

Hey I am new here and I signed because I get this error message in my laptop :
"Jcarousel: No width/height set for items. This will cause an infinite loop. Aborting ...".

Now I have no idea why, I read this forum and it seems it is some plug in you install in your websites???
.,.. I don't have a website and as far as I know I did not install anything. I am a regular user that encounter this message poping up way too often. Also sometimes I get another pop windows asking me if I want to Navigate away from this site. and last but not least every now and then I keep hearing like I have a tv web site or radio web site open but there is no webpage open, I even unplug my lan cable to see if stops but it continues talking for a while and then stops.

I suspected maybe my computer is controled by a hacker? I scanned with norton 2009 and only finds cookies. I have the norton internet security 2009 updated everyday.
Can anyone help??

When and where are you getting the message spaniard65?
If it is when you are surfing the internet what is the site address?

What application is giving you the dialog? Is it a web browser or email program etc?

Jcarosel is a plugin that is used on websites, it seems likely that you are visiting one that is misconfigured in some way. It may be a Drupal site or using an entirely different system. You may have some luck informing the webmaster at the site in question. Try using webmaster@websitename.whatever for the email address.

Drew, thanks for your response, I don't really know if it is a specific website I am visiting, I will try to pinpoint it from now on. What about that gosht tv or radio website that plays in the background? any ideas?

Is ther eanywhere in my settings that I may block that from loading? I hear comercials like it is from a tv station or a radio station but when I go to task manager and look at applications open it shows none. Here is a mistery... any one??

by the way Drew, it appears that the aplication is internet explorer, it seems random to me but I will try to see if it happens when I open any particular website.. thanks

I don't know what goshtv is & google give me many options for goshtv.

The simplest solution is to save a list of the sites that are open when it happens then quit Internet Explorer (IE) and open them one by one. It potentially could be any number of background tasks that are loading a web url such as RSS feeds, sorry I don't have IE at the moment (on a mac).

You could also try using Firefox, because if it doesn't happen with Firefox (quit IE first) you will know that it is something specific to IE. If it happens with Firefox then it would be something specific to the whole computer.
Sorry I suspect you may have better luck on an IE forum or IE support site. This site is about a website making tool, that has a plugin that can cause the same error message, but may not be related at all.

Thank you Drew, I appreciate your eforts. I will work with what you told me and if it doesn't work I'll kep checking other forums. Cheers.

Assigned:Wim Leers» Unassigned

I know this issue is for the D5 version, but I have the same issue with the D6 version. I'm using it with the views carousel module. My page starts of with a jCarousel, and it works fine in all browsers. I am have some javascript which replaces the jcarousel with another of the same (but showing different items).It works very well in firefox, but in Chrome I get the problem described above.

i don't know if it's helpfull to any of you, but I came across this forum when I was searching for the 'jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...' - error message.

I found out that jCarousel uses the $.browser object to determine the browser used by the client. Since this object is not very reliable (see http://api.jquery.com/jQuery.browser/), chrome is being recognided as a Safari browser.

Therefore, the code in the function 'margin()' in the $jc.extend class is executed incorrectly. I fixed this by replacing the 'margin()' function with the one below:

margin: function(e, p) {
if (!e)
return 0;

var el = e.jquery != undefined ? e[0] : e;

if (p == 'marginRight' && $.browser.safari) {
var old = {'display': 'block', 'float': 'none', 'width': 'auto'}, oWidth, oWidth2;

$.swap(el, old, function() { oWidth = el.offsetWidth; });

old['marginRight'] = 0;
$.swap(el, old, function() { oWidth2 = el.offsetWidth; });

if(oWidth2 - oWidth != 0) // HACK HACK
{
return oWidth2 - oWidth;
}
}

return $jc.intval($.css(el, p));
},

I know it's not the nicest solution, but hey, it's better then those nasty javascript error messages.

@kneet

Thanks man! This saved me a ton of trouble.

To add to the general knowledge about this issue, I encountered it in Safari when I put a jcarousel block in a div that was hidden with jQuery. This fix took care of it.

For anyone else who needs to put this fix in place, check jcarousel/lib/jquery.jcarousel.js around line 851. This is where the function kneet provided needs to go.

Kneet, I use the jquery.jcarousel.min.js version but I am not sure where should I paste this lines. Could you give me a hand please?

This is how my js looks: http://www.livingtrips.com/carrusel/js/jquery.jcarousel.min.js

Thank you for your help.

Regards,

Juan Pablo

#41 did not solve it for me.

#31 is the solution. Add a rule that specifies these dimensions and it will fix the problem.

Also see comment #29.

Refer following comment given by me on the same post:
http://drupal.org/node/576016#comment-4416516
It will be helpful to resolve this issue

subscribing, this bit me too

please make sure you've include CSS rules for this selector

.jcarousel-item-placeholder-horizontal{width:10px;}

it may be missing from your CSS and it will lead to JS errors. At least it fixed my problem

Solution #31 helped me a lot.

I'm using jCarousel with a custom theme and I'm facing the error message on IE7 (!#\?@GRRR!)

So I had to insert the code:

.jcarousel-list li,
.jcarousel-item {
    width: 200px;
    width: 100px;
}

where 200px and 100px are the dimensions of my image items. And the problem is solved.

Thank you lasac!