Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Having an issue with Carousel displaying multiple of same item View modes: 
User avatar
Member
Member
dford-catapultrpm - 4/24/2013 10:01:54 AM
   
Having an issue with Carousel displaying multiple of same item
I have a carousel that is returning custom documents using a custom transformation. For testing, i have put in two documents. However, the carousel has 6 items. It returns three of each item. Can someone help me figure out why this is returning 3 of each item.

User avatar
Kentico Support
Kentico Support
kentico_filipl - 4/25/2013 4:52:03 AM
   
RE:Having an issue with Carousel displaying multiple of same item
Hello,

First of all, what web part are you using? Is it Repeater with Carousel or some other one?

Additionally, it would be really helpful if you could paste a code of your custom transformation here so that we can inspect it since the problem would probably be there. What properties of the web part have you changed in comparison to the default ones?

Thank you in advance for this information.

Best regards,
Filip Ligac

User avatar
Member
Member
dford-catapultrpm - 4/25/2013 8:11:04 AM
   
RE:Having an issue with Carousel displaying multiple of same item
It is a Repeater with Carousel.

Here is the transformation code:
<%# IfEmpty(Eval("Image1"), ("<div class=\"caseStudyContainer\">" +
"<div class=\"caseStudyVideo\">" +
"<object type=\"application/x-shockwave-flash\" id=\"player42551812_859020663\" name=\"player42551812_859020663\" class=\"\" data=\"http://a.vimeocdn.com/p/flash/moogaloop/5.2.55/moogaloop.swf?v=1.0.0\" width=\"100%\" height=\"100%\" style=\"visibility: visible;\">" +
"<param name=\"allowscriptaccess\" value=\"always\">" +
"<param name=\"allowfullscreen\" value=\"true\">" +
"<param name=\"scalemode\" value=\"noscale\">" +
"<param name=\"quality\" value=\"high\">" +
"<param name=\"wmode\" value=\"opaque\">" +
"<param name=\"bgcolor\" value=\"#000000\">" +
"<param name=\"flashvars\" value=\"" + Eval("VideoURL") + "\"></object>" +
"</div>" +
"</div>"), ("<div id=\"caseStudyTextContainer\">" +
"<div class=\"casStudyTextContent\">" +
"<h2>" + Eval("Idea") + "</h2><br/>" +
"<h3>" + Eval("ClientName") + "</h3><br/>" +
"<div class=\"caseStudyCategories\">" +
"<div>CHALLENGE</div>" +
"<div>INSIGHT</div>" +
"<div>IDEA</div>" +
"<div>RESULT</div>" +
"</div>" +
"<div>" +
"<div>" + Eval("Challenge") + "</div>" +
"<div class=\"displayNone\">" + Eval("Insight") + "</div>" +
"<div class=\"displayNone\">" + Eval("Idea") + "</div>" +
"<div class=\"displayNone\">" + Eval("Results") + "</div>" +
"</div>" +
"</div>" +
"<div>" +
"<h3>AWARDS</h3><br/>" +
"<div>" + Eval("Awards") + "</div>" +
"</div>" +
"<div class=\"caseStudyTextImage\">" +
"<div class=\"image\">" + GetImage("Image1") + "</div>" +
"<div class=\"image displayNone\">" + GetImage("Image2") + "</div>" +
"<div class=\"image displayNone\">" + GetImage("Image3") + "</div>" +
"</div>" +
"</div>")) %>

User avatar
Kentico Support
Kentico Support
kentico_filipl - 4/26/2013 7:12:49 AM
   
RE:Having an issue with Carousel displaying multiple of same item
Hello,

The transformation seems to be fine. Could you provide us with some screenshots of the behaviour or is there a live example of it? Does the issue occur only if you use this custom transformation for Repeater with Carousel or also other web parts (e.g. Repeater, Datalist, etc.)?

Just to clarify the issue, are you using the latest hotfix? If not, haven't you tried to update it?

Best regards,
Filip Ligac

User avatar
Member
Member
dford-catapultrpm - 4/29/2013 8:26:09 AM
   
RE:Having an issue with Carousel displaying multiple of same item
This does happen with the default transformation. I also have a repeater without a carousel that does not have the same issue. That repeater is pulling the parent documents of the documents the repeater with a carousel is pulling in.

When was the latest hotfix released? I just started using kentico about 4 weeks ago.

Im not sure screen shots will be of any help. What happens is that there are two documents that the repater pulls in, however it creates a list with 6 items. It will list the first and second items, then repeat that pairing 2 more times.

User avatar
Kentico Support
Kentico Support
kentico_filipl - 4/30/2013 4:28:19 AM
   
RE:Having an issue with Carousel displaying multiple of same item
Hello,

If this issue also happens with default document types (e.g. Articles - CMS.Articles) and default transformations (e.g. CMS.Articles.Default) for them in Repeater with Carousel web part, it is a bug in the current hotfix you are using but it should be fixed in the latest one because I have tried it and it was working properly as expected. If that is the case, I would advice you to update the hotfix to 7.0.32 through Kentico Installation Manager.

Just so you know, hotfixes are released on Friday and they include fixes of found bugs for the past week.

Best regards,
Filip Ligac

User avatar
Member
Member
dford-catapultrpm - 4/30/2013 3:36:53 PM
   
RE:Having an issue with Carousel displaying multiple of same item
I think im running 7.0.4640.

Also, i have a different document type that im using with a regular repeater. The regular repeater works correctly. When i use the repeater with carousel, i still adds extra elements to the list by repeating entries. I have 5 documents, when i use the repeater, i get a list of 5. When i use the repeater with carousel, i get a list of 20. Its the same transformation for both.

User avatar
Member
Member
dford-catapultrpm - 4/30/2013 4:23:36 PM
   
RE:Having an issue with Carousel displaying multiple of same item
Sorry, looking at the wrong version, it is 7.0.32

User avatar
Kentico Support
Kentico Support
kentico_filipl - 5/1/2013 8:21:23 AM
   
RE:Having an issue with Carousel displaying multiple of same item
Hello,

I have reported a bug for the Repeater with Carousel web part regarding slide effects on live site which might be somehow connected to the issue you are having.

Please stay patient until the next hotfix release in which this bug should be fixed and hopefully it should also solve your problem.

Best regards,
Filip Ligac

User avatar
Kentico Support
Kentico Support
kentico_filipl - 5/9/2013 4:24:00 AM
   
RE:Having an issue with Carousel displaying multiple of same item
Hello,

My reported bug was rejected so your issue is probably not caused by the behaviour of Repeater with Carousel I originally thought of.

It would be really helpful if we could inspect the behaviour directly on your site so please send us a ticket to support@kentico.com so that we could take a look at it.

Thank you in advance.

Best regards,
Filip Ligac

User avatar
Member
Member
dford-catapultrpm - 5/9/2013 8:25:24 AM
   
RE:Having an issue with Carousel displaying multiple of same item
Someone from support is saying to use a repeater with effect rather than a repeater with carousel which is working for me.

However, i noticed this code in the jquery-carousel.js file which i believe is what is adding extra elements in the list.

var running = false, animCss = o.vertical ? "top" : "left", sizeCss = o.vertical ? "height" : "width";
var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible;
if (o.circular) {
ul.prepend(tLi.slice(tl - v - 1 + 1).clone())
.append(tLi.slice(0, v).clone());
o.start += v;
}


The carousel i was using was a circular carousel. In my custom js file, i copied this file and made changes. One of the changes i made was to comment out
o.start += v;
This moved the start point past the length of the list for me. I just tried commenting out the
ul.prepend(tLi.slice(tl - v - 1 + 1).clone())
.append(tLi.slice(0, v).clone());
then it stopped adding the extra elements in the list. I'm not exactly sure what the purpose of the code is but i think that was the cause of the issue.

However, i took the advice of the people at support and used a repeater with effect rather than repeater with carousel.

User avatar
Kentico Support
Kentico Support
kentico_filipl - 5/10/2013 2:27:40 AM
   
RE:Having an issue with Carousel displaying multiple of same item
Hello,

It would be probably best to use Repeater with effect because Repeater with Carousel is mainly used for images of small sizes. It should be also possible to use it with other document types but it is necessary to modify the initialization script (as you have done) and the web part CSS styles to accommodate required number of displayed items.

Important part of CSS to add/modify is the following one:
.carousel2d
{
width:800px;
}

.carousel2d li
{
width: 700px;
height: 500px;
}

Best regards,
Filip Ligac