Copied to clipboard

Flag this post as spam?

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


  • Jeremy Coulson 61 posts 143 karma points
    Nov 12, 2019 @ 19:13
    Jeremy Coulson
    0

    MacroPartial view only shows a semicolon

    Good afternoon!

    We are currently migrating our Umbraco sites to a new web host. 99% of everything is in good shape, but we do have one page that is misbehaving on the new host. Basically, there is a view associated with a macro. The view only loads a semicolon on the web page. We have verified that everything (at least everything we can think of) is identical between these servers.

    Here is the code of the view:

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @Html.Action("InitWarrantyForm","WarrantySurface" );
    

    If I remove the ; from the Html.Action, the view returns nothing at all. If I add in any other text, like <div>Help me. I am losing my mind.</div>, I see that text; however, the InitWarrantyForm method in the WarrantySurface controller is never called.

    Can anyone think of any idea why this is happening?

    Thanks!

    Jeremy

  • Anon 29 posts 125 karma points
    Nov 12, 2019 @ 22:05
    Anon
    1

    Without knowing what the InitWarrantyForm action is for, it's difficult to say - it looks to not be returning any sort of output or return value (which is why you only get the semi colon - it's being rendered as text as it's not needed for the Razor script.

    When you say the controller isn't called, have you checked by stepping through with a debugger? Or try returning a hardcoded value?

  • Jeremy Coulson 61 posts 143 karma points
    Nov 14, 2019 @ 17:05
    Jeremy Coulson
    0

    Matthew,

    I had tried stepping through InitWarrantyForm and returning a hard-coded value, but I couldn't find a problem. My coworker, however, found the issue. It was related to a missing XML file of some data that the view needed. The failure was very silent: no errors, no exceptions, just emptiness with no explanation.

    Sounds philosophical.

    At any rate, we got it sorted out.

    Thanks!

    Jeremy

Please Sign in or register to post replies

Write your reply to:

Draft