Copied to clipboard

Flag this post as spam?

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


  • Matt Taylor 873 posts 2086 karma points
    Jan 22, 2015 @ 12:06
    Matt Taylor
    0

    Property converter clash MultipleMediaPickerConverter

    This may be because I have upgraded the project to Umbraco 7.2 but I intermittently get the following error when accessing the site, Typically after I've rebooted the PC.

    Type 'Umbraco.Extensions.PropertyConverters.MultipleMediaPickerConverter' cannot be an IPropertyValueConverter for property 'imageSlider' of content type 'Home' because type 'Our.Umbraco.PropertyConverters.MultipleMediaPickerPropertyConverter' has already been detected as a converter for that property, and only one converter can exist for a property.

    Is it because of the upgrade and what's the best way to take care of it?

    Regards,

    Matt

     

     

     

     

  • marcelh 171 posts 471 karma points
    Feb 18, 2015 @ 23:46
    marcelh
    0

    Running into the same issue with the (single) MediaPickerConverter here, after importing that piece of code into my solution and refering Our.Umbraco.ProperyConverters. Did you manage to find a solution? Not using the Our.Umbraco.ProperyConverters solves the problem for me (but introduces another as content of type IPublishedContent is not generated as such anymore).

    Any other ideas?

  • Matt Taylor 873 posts 2086 karma points
    Feb 19, 2015 @ 10:28
    Matt Taylor
    0

    Unfortunately I've not spent much time on it because it doesn't happen very often, just when my SQL Server service fails to start so the site fails and I see the error when getting it going again.

  • marcelh 171 posts 471 karma points
    Feb 19, 2015 @ 11:48
    marcelh
    0

    I understand Matt. Unfortunately the issue pops up when running the website and generating the models using the Zbu Model Builder :(

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 19, 2015 @ 12:38
    Jeroen Breuer
    0

    Hello,

    The MultipleMediaPickerPropertyConverter should be unregistered. That happens here in the code: https://github.com/jbreuer/Hybrid-Framework-for-Umbraco-v7-Best-Practises/blob/master/Umbraco.Extensions/Events/UmbracoEvents.cs#L64

    Is that code not being called anymore somehow?

    Jeroen

  • marcelh 171 posts 471 karma points
    Feb 19, 2015 @ 13:19
    marcelh
    0

    Bingo! That was it Jeroen. I knew it had to be something like this, but didn't realise had to be unregistered in the ApplicationStarting event. Thanks for taking the time to respond.

    I applied the best practises from your Hybrid Framework to our solution, including the models builder. And although it took me some time to get the models generated correctly, I really like the approach! Thanks for the good work!

  • Matt Taylor 873 posts 2086 karma points
    Feb 19, 2015 @ 13:21
    Matt Taylor
    0

    Looks like that's your answer then mareclh, disable it in the event.

    Jeroen, yes the event is running fine.

    I think what happens in my case is that the property converter disabling code doesn't get run if there is critical error such as the database not being available.
    You can test this your self by stopping the SQL Express service.

    Once the service has been started the site tries to run but the property converter disabling code and everything else after the line that caused the error will not get run until the app pool has been recycled.

    Regards, Matt

Please Sign in or register to post replies

Write your reply to:

Draft