Copied to clipboard

Flag this post as spam?

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


  • Brendan Rice 538 posts 1102 karma points
    May 14, 2013 @ 21:45
    Brendan Rice
    0

    Umbraco v 4.9.0 unpublished nodes still visible on the front end

    I have a site with unpublished content. The client is complaining that the content is still visible on the front end.

    Has anyone seen this before and is there a fix?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 15, 2013 @ 22:41
    Jan Skovgaard
    0

    Hi Brendan

    Something of the back of my mind tells me that I've seen other people have this issue before but can't remember if it's something I've seen in the issue tracker or on a post here on our.

    If it's possible I think the best option is to upgrade to latest stable version of v4.11 since there unfortunately also are som nasty bugs in this version not to mention the newly discovered security issues. Even though there is a patch specifically for 4.9.0 some of the bugs in this version justifies an upgrade I think. But I also know that it's something you need to clear with your client since it probably involves some economy.

    Hope this helps.

    /Jan

  • Brendan Rice 538 posts 1102 karma points
    May 16, 2013 @ 01:42
    Brendan Rice
    0

    Thanks Jan. I hope the client goes for the upgrade, fingers crossed it would fix the issue.

    Thanks again for the help.

    Brendan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 16, 2013 @ 20:12
    Jan Skovgaard
    0

    Hi Brendan

    Yes I really think it's the best solution in this case - let us know how it turns out.

    /Jan

  • Andrew 47 posts 105 karma points
    Jun 21, 2013 @ 17:16
    Andrew
    0

    Idk, I've had something like this issue in 6.1.1.

    It requires a republish of the entire site, clearing the browswer's cache and sometimes even restarting the site to fix (and even then it will pop back up sometimes).

    I'm sort of thinking its a caching problem with umbraco.

  • Comment author was deleted

    Mar 26, 2014 @ 16:11

    VERY late to the party here but I had a Client who couldn't upgrade but had this issue.  I created a rest extension and hit my method via ajax like so.  The key is to delete the XML record from the DB:

    public static string UnPublish(int contentId)
            {
                bool success = false;
    
                var doc = new Document(contentId);
    
                if (doc != null)
                {
                    doc.UnPublish();
                    RemoveXmlFromDB(contentId);
                    umbraco.library.UpdateDocumentCache(doc.Id);
                    umbraco.library.RefreshContent();
                    success = true;
                }
    
                return jss.Serialize(new { success = success });
            }
    
    private static void RemoveXmlFromDB(int nodeId)
            {
                var sqlHelper = Application.SqlHelper;
    
                var sql = @"
                  DELETE TOP(1)
                  FROM cmsContentXml
                  WHERE nodeid=@nodeId
                ";
                sqlHelper.ExecuteNonQuery(sql, sqlHelper.CreateParameter("@nodeId", nodeId));
            }
    
Please Sign in or register to post replies

Write your reply to:

Draft