Copied to clipboard

Flag this post as spam?

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


  • Sören Deger 726 posts 2833 karma points c-trib
    Dec 10, 2013 @ 15:09
    Sören Deger
    0

    uShare - Not shared, Page not public

    Hi,

    I can't share any node in Umbraco 6.1.6 on facebook. I get everytime the message: 

    Not shared

    Page not public

     

    I have read the documentation, but I think already is right.

     

    Any idea?

     

    Best regards

    Sören

  • Sören Deger 726 posts 2833 karma points c-trib
    Dec 10, 2013 @ 15:18
    Sören Deger
    100

    I have solved it. At first, the node must be publish after the installation. Therefore, the share button not working. This was too easy.

    Very great package!

    Sören

  • Governor Technology 146 posts 551 karma points
    Dec 10, 2013 @ 15:24
    Governor Technology
    1

    Hi Sören

    That error would occur if the node you're trying to share is not publicly available. Can you please confirm the following:

    1) It is not trashed 2) It is published 3) The published node has a frontend URL

    Below is the method to check if the node is public. Can you run this in a script and provide the id of the node you're trying to share as a test to see where it fails:

        /// <summary>
        /// Returns true if the document is published and not trashed and available in cache.
        /// </summary>
        /// <returns></returns>
        public static bool IsDocumentPublic(int id)
        {
            var document = new Document(id);
    
            return !document.IsTrashed && document.Published && !string.IsNullOrEmpty(GetFrontEndNodeName(id)) && !string.IsNullOrEmpty(GetFrontEndNodeUrl(id));;
        }
    
        /// <summary>
        /// The Umbraco page url for the content node currently viewed.
        /// </summary>
        /// <param name="nodeId"></param>
        /// <returns></returns>
        public static string GetFrontEndNodeUrl(int nodeId)
        {
            return Helper.Web.GetAbsoluteUrl(new Node(nodeId).Url);
        }
    
        /// <summary>
        /// The Umbraco page name for the content node currently viewed.
        /// </summary>
        /// <param name="nodeId"></param>
        /// <returns></returns>
        public static string GetFrontEndNodeName(int nodeId)
        {
            return new Node(nodeId).Name;
        }
    
        /// <summary>
        /// Returns the absolute url for a given url.
        /// </summary>
        /// <param name="relativeUrl"></param>
        /// <returns></returns>
        public static string GetAbsoluteUrl(string relativeUrl)
        {
            return string.Concat("http://", umbraco.library.RequestServerVariables("HTTP_HOST"), relativeUrl);
        }
    

    Hopefully this will help with the issue.

    Regards,

    Rigardt

  • Governor Technology 146 posts 551 karma points
    Dec 10, 2013 @ 15:29
    Governor Technology
    0

    Hi Sören

    Glad to hear it's working now!

    Rigardt

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies