Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steve 472 posts 1216 karma points
    Jan 14, 2015 @ 22:39
    Steve
    0

    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?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 15, 2015 @ 06:00
    Jan Skovgaard
    0

    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

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Jan 15, 2015 @ 06:26
    Richard Soeteman
    0

    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

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 15, 2015 @ 12:43
    Jeroen Breuer
    0

    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

  • Steve 472 posts 1216 karma points
    Jan 15, 2015 @ 14:40
    Steve
    0

    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>
  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 15, 2015 @ 16:37
    Jan Skovgaard
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft