Copied to clipboard

Flag this post as spam?

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


  • Saied 349 posts 674 karma points
    Oct 20, 2015 @ 17:18
    Saied
    0

    Adding a page and then deleting it throws YSOD of death instead of a friendly message?

    If I have a website called www.test.com and a blog node does not exist under the page www.test.com, yet and I try to access www.test.com\blog, I get the umbraco message:

    No umbraco document matches the url /blog. This is fine, however, when I add the blog node and access the page, it comes up fine, but now when I delete it and try to go to www.test.com\blog, instead of getting the No umbraco document matches the url message, I get the following:

    Object reference not set to an instance of an object.

    I have 2 websites and both point to the same view. The one that I didn't delete the blog page comes up fine, but the one that did throws a YSOD instead of a message like it can't find the url.

  • Marc Goodson 2149 posts 14377 karma points MVP 9x c-trib
    Oct 20, 2015 @ 23:26
    Marc Goodson
    0

    Hi Saied

    Have you unpublished the blog node before deleting it ?

    if you look in the app_data/umbraco.config file this contains an xml version of content that has been published; if you haven't unpublished then the deleted node may still appear in here.

    to fix, if you rebuild the xml file by visiting

    /umbraco/dialogs/republish.aspx?xml=true

    then the rogue item should be removed from umbraco.config xml cache file and your site should go back to saying node does not exist...

    regards

    marc

  • Saied 349 posts 674 karma points
    Oct 21, 2015 @ 12:27
    Saied
    0

    Hi Marc,

    Here are all the things I tried, but nothing worked.

    1. I deleted the node and then republished
    2. I unpublished the node and then replublished
    3. I republished by right clicking and by using the link you specified
    4. I also noticed that on the website that I have pointing to my localhost, I can see the umbraco.config update when I remove the node. When I refresh the page I just deleted, I don't get the YSOD, I get a cached page which doesn't seem to go away even after doing a hard refresh.

    Here is a thought I had, but I don't see how this could be a problem. I have a document type blog and a template blog. Both my websites websiteA.com and websiteB.com use the same template. It shouldn't matter if websiteA.com has a blog section and websiteB.com has a blog section, right?

    Also, this started off as a Visual studio project, does it make a difference if I have included blog.cshtml in my project. I know when you create the template through Umbraco, it leaves it excluded?

    Thanks, Saied

  • Marc Goodson 2149 posts 14377 karma points MVP 9x c-trib
    Oct 23, 2015 @ 00:17
    Marc Goodson
    0

    Hi Saied

    If you have a blog post you want to remove you need to 'Unpublish' first and then delete it.

    UnPublish will remove it from the umbraco.config xml file for the server on which you are unpublishing. It will tell the database that the document is unpublished. Deleting will then remove it from the database.

    It sounds like to me you have several environments, local, test, all pointing to the same database ?

    If so unpublishing the document on the local url, will remove it from the umbraco.config cache file on the local machine; but NOT from the www.test.com's umbraco.config cache file. It will tell the database it is unpublished.

    So open up the umbraco.config file in each of your environments, and verify the node you deleted, has been removed from each copy in each environment.

    Rebuilding the Umbraco.Config file by using the url /umbraco/dialogs/republish.aspx?xml=true on each environment 'should' rebuild the cache file from the database for each environment and make sure the deleted node has gone from everywhere...

Please Sign in or register to post replies

Write your reply to:

Draft