1

I have a Sitecore 8 project where we have created a component for the editors to use. On that editor we used product detail where image carousel is being used to display images.

An image carousel takes Datasource from all underneath items like below.

The tree looks like this:

Sitecore
    Content
       Product 
         Product Item
            Content
                Product Carousel Content
                    Carousel Image 1
                    Carousel Image 2
                    Carousel Image 3

Whenever I am publishing the same item, product details are coming properly. However Product Carousel Content are not coming. Whereas it is working fine in staging site.

In the Experience Editor the user can edit the Datasource Item's fields, i.e. he can edit text, general link field of this Item. However for Product Carousel I see the error

Datasource must be set to Product Carousel Content.

datasource for product carousel is query:./_content/Product Details Carousel

However when I set data-source to item directly like below it will display the product images

/sitecore/content/Product/Website/Home/ProductItem/Content/Product Details Carousel

This is happening for few other items on page and I am not sure if there is some issue with publishing or Sitecore query.

Is that a Sitecore bug or something I am missing? Hope I can get some help from you.

  • Do you have workflows on the carousel items? Also, when publishing, are you publishing with subitems? – Hishaam Namooya Feb 9 '18 at 18:34
  • No we do not have any workflow on item and when publishing I am including all sub item and related items – Vijay Feb 9 '18 at 18:36
  • The initial '.' after the 'query:' is saying start from 'this' item and then navigate to /_content/Product Details Carousel. You don't need to mention the whole path just remove the underscore in the query. – Naveed Ahmad Feb 9 '18 at 19:10
3

You have stated that the datasource is set to:

datasource for product carousel is query:./_content/Product Details Carousel

But when you change datasource is set to following it works:

However when I set data-source to item directly like below it will display the product images /sitecore/content/Product/Website/Home/ProductItem/Content/Product Details Carousel

Your query is set to _content but your item path is Content. Note the difference of the underscore in your original query.

Either update your query to remove the underscore, or rename your item to include the underscore.

  • Thank You Naveed and Jammy. Removing _ resolve the issue Although I am not sure why it is working on staging and for other product. – Vijay Feb 9 '18 at 20:08
  • Probably because your Content item is actually called _content, would be my guess. Double check the item name/path carefully in your staging environment and other products. If this solved your problem then please marked as answered. – jammykam Feb 10 '18 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.