Copied to clipboard

Flag this post as spam?

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


  • David Amri 214 posts 740 karma points
    Mar 06, 2020 @ 08:40
    David Amri
    0

    500 error loading partial view with ajax

    First of, I'm unable to add this question in no other subject than Using Umbraco and getting started...

    I've got this wierd 500 error when trying to load a partial view with ajax actionlink. From what I can tell the error is thrown because of a macro inside the RTE content. If the node does not have the macro in the RTE text it works without any issues.

    This setup is like this. I've got a view where it's possible to switch between a list and grid layout of the loaded content.

    Initially the view loads one of these two partial views without ajax. This is working fine, I'm able to load either of the two partial views even if one of the nodes has a macro in the RTE text. No 500 error is thrown.

    Now, If I try to switch the layout, in other words loading a partial view with a ajax actionlink, jqurey is throwing a 500 error and nothing happens.

    I think this i really strange. Since I've managed to figure out that it is the macro within the RTE text that is causing this issue I would think that I would be thrown a 500 error when trying to load the partial view without a ajax request as well? Why is the partial view throwing a 500 error when trying to load the content with ajax but works without it?

    Update. When getting the property no error is thrown

    @row.GetProperty("RTE text with macro")
    

    But when I try to get the value it breaks

    @row.GetPropertyValue("RTE text with macro")
    

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft