Updating my website after a long while butI seem to hit a sticking point. I have the following structure:
Home > Blog > Blog Item, when running in localhost/blog/ displays fine hower, localhost/blog/item1 brings a page not found error.
I have the following razor macro which lists all my blog pages on the home page to generate the link, which works, grabs all each items data, except oddly the link for the page itself generates the dreaded "not found" demon:
@inherits umbraco.MacroEngines.DynamicNodeContext
@{ // Get the Homepage Node var rootNode = @Model.AncestorOrSelf(1);
// Get the News Page Node (Assuming there is only one) var blogNode = rootNode.DescendantsOrSelf() .Where("NodeTypeAlias == \"Blog\"")[0]; // Get the News List var blogList = blogNode.Children .Where("NodeTypeAlias == \"BlogItem\""); var maxItems = 3; }
If you view the generated source are you actually getting the right url? What happens if you click on the "link to document" in your Properties Tab? Do you get page not found?
Thanks for the reply! Yes I am getting <ahref="/blog/item1/"> - This reflects the link provided by "link to document" in properties. However following this generates the same page not found error.
No umbraco document matches the url 'http://localhost/blog/item1/'
umbraco tried this to match it using this xpath query'/root/*/* [@urlName = "blog"]/* [@urlName = "item1"] | /root/* [@urlName = "item1"]')
Previewing before publishing an amend also generates a blank page, with blank source.
Weird can you republish the whole website and see if all your nodes "Blog Items" are still present? Under the Settings section can you also see if all the docTypes are present.
I havent used v4.8.1 yet but came across something similar in the past where i accidently deleted a docType.
Hey thanks for the advice but still no joy, Nodes are still present after republishing, and my docTypes are still present.
I am now worried however as when setting up the doctypes I did delete (stupidly) and recreate them (rather than copy) as I had initially gotten them in the wrong structure. Could this be the issue?
Just to update, this appears to be a node issue, I set up in a new instance - (this time without deleting and replacing docTypes) and works as expected.
Thanks for the help though and helping me wittle down the problem!
nested page not found bug
Hi Guys,
Updating my website after a long while butI seem to hit a sticking point. I have the following structure:
Home > Blog > Blog Item, when running in localhost/blog/ displays fine hower, localhost/blog/item1 brings a page not found error.
I have the following razor macro which lists all my blog pages on the home page to generate the link, which works, grabs all each items data, except oddly the link for the page itself generates the dreaded "not found" demon:
Running locally on IIS7.5 , Windows Premium, SQL Server 2008 R2
This is my first post asking for help so please let me know if you need any other details.
Regards,
Joe
Hi Joe,
If you view the generated source are you actually getting the right url? What happens if you click on the "link to document" in your Properties Tab? Do you get page not found?
Hi Fuji,
Thanks for the reply! Yes I am getting <a href="/blog/item1/"> - This reflects the link provided by "link to document" in properties. However following this generates the same page not found error.
No umbraco document matches the url 'http://localhost/blog/item1/'
umbraco tried this to match it using this xpath query'/root/*/* [@urlName = "blog"]/* [@urlName = "item1"] | /root/* [@urlName = "item1"]')
Previewing before publishing an amend also generates a blank page, with blank source.
I should also point out I'm using v4.8.1
Weird can you republish the whole website and see if all your nodes "Blog Items" are still present? Under the Settings section can you also see if all the docTypes are present.
I havent used v4.8.1 yet but came across something similar in the past where i accidently deleted a docType.
Hey thanks for the advice but still no joy, Nodes are still present after republishing, and my docTypes are still present.
I am now worried however as when setting up the doctypes I did delete (stupidly) and recreate them (rather than copy) as I had initially gotten them in the wrong structure. Could this be the issue?
Just to update, this appears to be a node issue, I set up in a new instance - (this time without deleting and replacing docTypes) and works as expected.
Thanks for the help though and helping me wittle down the problem!
J
Hi Joe,
Sorry for replying now only. I must have been something to do with the Document Type, but glad you got it working though.
//fuji
is working on a reply...