Copied to clipboard

Flag this post as spam?

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


  • Draageryd 5 posts 75 karma points
    Feb 06, 2020 @ 21:14
    Draageryd
    0

    Server error when deleting content @Model.FooterHeader

    I'm new to Umbraco and have now tried to get a site up running 11 times.

    I have: - downloaded Umbraco - unzipped it - opened the folder in Visual Studio Code - run the site - a sample site appears - go to "Content" - delete (fx) "Blog" - push "Save and publish" - opens the site in the browser - error.... - go to Umbraco again and - restores "Blog" - opens the site in the browser - ta da.... it works again!

    This is the error that I get after deleting content: Line 31:

    Line 32:

    @Model.FooterHeader

    Line 33:

    @Model.FooterDescription

    Line 34: Line 35:

    Why can't I delete content / what am I doing wrong?)

  • Nik 1599 posts 7179 karma points MVP 6x c-trib
    Feb 06, 2020 @ 22:36
    Nik
    0

    Hey Thomas,

    My guess would be that something in your template relies on the blog being in existence. So when you are removing it it's throws the error. The fix would be to modify the view where the issue happens to stop it looking for the blog

    Nik

  • Draageryd 5 posts 75 karma points
    Feb 07, 2020 @ 06:30
    Draageryd
    0

    I think you are right, but I can't understand why this is so.

    I have worked with other CMS's and used this process: - create componentes - create templates using these components - create content based on these templates

    This means that I only could get into trouble when deleting a template when there where related content. As long as the template remained existing content could be added or removed - independently of the template - simply because the content was rendered when called/compiled.

    As I understand it the template is tied to the code and the content is tied to the template. I simply don't understand why I'm not able to delete content without getting the server error telling me that something is missing.

    I know this is basic so if anyone can point me in the right direction, I would be very happy. (I have tried to find the answer in the documentation pages at Umbraco)

Please Sign in or register to post replies

Write your reply to:

Draft