I am using bxSlider for a slideshow on the homepage. I am iterating through children of the "Carousel" node, which are "slideshow items". I am noticing that when ever I preview the homepage some of the unpublished slideshow item nodes are made live, not just in the preview, but the live site, untill I save and publish the homepage node. What could cause this?
What exact version of Umbraco are you using? That's something that should not happen. Is it only when you preview the slideshow? Or does it also happen when previewing other pages?
This must be something in your implementation I'm afraid. If it's only after you have previewed the homepage I blame caching and otherwise I think your are using the ContentService API's to retrieve the data but those return backoffice data. Make sure you only work with published data as mentioned in this document https://our.umbraco.org/documentation/Reference/Mvc/querying
Even if you leave the page maybe you're still in preview mode. This happend to me before. If you log out and log in again do you still see the unpublished content?
One of our previous team members wrote the Razor script for pulling in the slideshow content and used this for the iteration. I know he was thinking that this made it usable on any slideshow node, but could this be an issue?
The script looks fine and should not be causing this. Not sure what happens under the hood though...but I'm thinking it might be a good idea to try and rebuild the examine indexes by going to the "Developer" section and then got to the "Examine dashboard" to the top right.
Unpublished Content Pulled In For Slideshow
I am using bxSlider for a slideshow on the homepage. I am iterating through children of the "Carousel" node, which are "slideshow items". I am noticing that when ever I preview the homepage some of the unpublished slideshow item nodes are made live, not just in the preview, but the live site, untill I save and publish the homepage node. What could cause this?
Hi Steve
What exact version of Umbraco are you using? That's something that should not happen. Is it only when you preview the slideshow? Or does it also happen when previewing other pages?
/Jan
Hi Steve,
This must be something in your implementation I'm afraid. If it's only after you have previewed the homepage I blame caching and otherwise I think your are using the ContentService API's to retrieve the data but those return backoffice data. Make sure you only work with published data as mentioned in this document https://our.umbraco.org/documentation/Reference/Mvc/querying
Best,
Richard
Even if you leave the page maybe you're still in preview mode. This happend to me before. If you log out and log in again do you still see the unpublished content?
Jeroen
I am using 6.1.6.
One of our previous team members wrote the Razor script for pulling in the slideshow content and used this for the iteration. I know he was thinking that this made it usable on any slideshow node, but could this be an issue?
@using umbraco.MacroEngines @inherits umbraco.MacroEngines.DynamicNodeContext @{ var i = 0; var nodeId = Parameter.nodeId; } <div class="slider"> @foreach (var item in Model.NodeById(nodeId).Children.Where("Visible") ){ if ( item.HasValue("image") ){ var location = (item.titleLocation != "") ? @item.titleLocation : "top-left"; <div class="slide" id="@i"> <h3 class="slideTitle @location">@item.name</h3> @if ( item.isVideo != true) { <a onclick="ga('send', 'event', '@Model.Name Carousel', 'click', 'Link to Carousel Item @i - Story')" href="@item.imageLink"><img src="@item.image" title="@item.name" alt="@item.name" /></a> } else { <a onclick="ga('send', 'event', '@Model.Name Carousel', 'click', 'Link to Carousel Item @i - Video')" class="video" href="@item.videoURL?autoplay=1&modestBranding=0&autohide=1&showinfo=0&rel=0&fs=0&theme=light"> <img src="/media/1362779/videooverlay.png" class="overlay" height="364" width="750" alt="Play Video for @item.name" /> <img src="@item.image" title="@item.name" alt="@item.name" /> </a> } <div class="caption">@item.copy</div> </div> i++; } } </div>
Hi Steve
The script looks fine and should not be causing this. Not sure what happens under the hood though...but I'm thinking it might be a good idea to try and rebuild the examine indexes by going to the "Developer" section and then got to the "Examine dashboard" to the top right.
Does it stil happen after re-indexing?
/Jan
is working on a reply...