Copied to clipboard

Flag this post as spam?

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


  • J 445 posts 862 karma points
    May 05, 2020 @ 10:45
    J
    0

    Finding and executing extension method "GetValue"

    On my site i have a consistent error found under the logs

    "ERROR Umbraco.Core.Dynamics.DynamicInstanceHelper - An error occurred finding and executing extension method "GetValue" for type "Umbraco.Web.Models.DynamicPublishedContent". Types searched for extension methods were Umbraco.Web.Models.DynamicPublishedContent."

    found within the logs. How could i narrow down what/where the issue is?

    Ta

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    May 06, 2020 @ 08:17
    Nik
    1

    Hi J,

    Personally, I wouldn't focus on this error, instead I would look to be removing the use of Dynamics from the site. They dynamics approach, although handy, is less performant and isn't supported in later version of Umbraco so could make upgrades/migrations harder so it would be an effective use of your time to remove it.

    Nik

  • J 445 posts 862 karma points
    May 06, 2020 @ 08:46
    J
    0

    Hi Nik

    What "Dynamics" are you referring to please?

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    May 06, 2020 @ 08:55
    Nik
    1

    Hi J,

    In your views I suspect you are accessing things like:

    CurrentPage, Umbraco.Content, Umbraco.Media

    These all return dynamic objects instead of instances of IPublishedContent. So I would be looking to remove the use of these methods / properties:

    e.g., Umbraco.Content becomes Umbraco.TypedContent,

    CurrentPage is a dynamic object property that is available in views that inherit from UmbracoTemplatePage, so instead of trying to access a property directly from CurrentPage, I'd be accessing properties with Model.Content.GetPropertyValue("propertyAlias")

    Does that help?

    Nik

  • J 445 posts 862 karma points
    May 06, 2020 @ 09:00
    J
    0

    Ok i think i know what you mean. Let me give it a try and see what happens.

    Is there any page/doc to give me a breakdown of what the new value would be when converting?

    Many thanks

Please Sign in or register to post replies

Write your reply to:

Draft