Copied to clipboard

Flag this post as spam?

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

  • fede 2 posts 71 karma points
    Jun 06, 2019 @ 15:52

    Hi i'm just getting started to umbraco.

    I have changed the document type of a "Product" (deleted all product details and added a new area text)

    save and publish was okay.

    But when i navigated to the product i got:

    Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS1061: 'Product' does not contain a definition for 'ProductName' and no extension method 'ProductName' accepting a first argument of type 'Product' could be found (are you missing a using directive or an assembly reference?)

    Source Error:

    Line 16: Line 17:

    Line 18:


    Line 19:
    @Model.Content.Parent.GetPropertyValue("DefaultCurrency") @Model.Content.Price.ToString("F")
    Line 20:

    can somebody help me? thanks

  • Brandon Osborne 37 posts 160 karma points c-trib
    Jun 06, 2019 @ 17:15
    Brandon Osborne

    Hello There, Fede,

    Your code seems correct. You should look at your product DocumentType and make sure you have a property called ProductName (pay particular attention to the alias, not just the name). If you do, then you should confirm that your @model at the top of the page is correctly defined. Please post the entire Product view & I'll tell you if I see something wrong.

  • Bryna 66 posts 228 karma points
    Jun 06, 2019 @ 20:45

    You may also want to check your modelsbuilder mode in the web.config. If it is DLL, you will have to generate your models explicitly in the back office.

Please Sign in or register to post replies

Write your reply to: