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);
}
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
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
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:
Hopefully this will help with the issue.
Regards,
Rigardt
Hi Sören
Glad to hear it's working now!
Rigardt
is working on a reply...