Copied to clipboard

Flag this post as spam?

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


  • Mahyar 1 post 71 karma points
    Aug 18, 2020 @ 09:58
    Mahyar
    0

    Why the result of the Umbraco.Content is always null in SurfaceController

    We have a master / detail document type similar to blog & posts and we need the posts to be filtered according to some filters chosen by the users. This required an ajax request to be send to a action in the controller to return the partial view and update the HTML element with the filtered result. As I have understood, these custom actions need to be inside a surface controller to be found in the routing system. This is working well, however, inside the action, the response of the IPublishedContent model = Umbraco.Content(id) is null while the same has results in another macro.

    I was just wondering if there's another best practice for this situation or how this null result can be solved.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies