Conflicting PartNames

Topics: Core, Customizing Orchard
Dec 10, 2014 at 2:47 PM

I've recently attempted to finally migrate our orchard site away from using Orchard.Media which is now deprecated, to the Orchard.MediaLibrary module and all the media processing niceties which come with it!

However, i've rather come unstuck. The new Orchard.MediaLibrary module has a new contentpart in it called "DocumentPart" and one called "VideoPart" - unfortunately one of our own modules already has contentparts with these names, and it seems the driver for the medialibrary is now getting called if we try to visit a contenttype with those parts instead of our own driver.

This seems like a bit of an oversight, as surely different third parties are going to come up with possibly the same names from parts, unless its me and im not doing something to get it to load the right one? I'm loathed to have to rename our parts as it will be days of work due to how many of our modules use them, at the same time i'd like to use the new module especially with the old one now officially not supported (that been said i probably dont actually need the new video/document parts, but id rather not need to edit core orchard code).

Anyone any ideas for a work around?
Dec 15, 2014 at 8:00 PM
Not really an oversight, we knew this was going to happen in a small number of cases, but we decided that we would prefer to deal with those cases rather than add complexity to avoid them. One way to deal with it is to export your content from the old site, modify the recipe to rename the content types to something that doesn't conflict, update your code accordingly, then import the new recipe into the new site.
Dec 16, 2014 at 8:33 AM
Hi Bertrand,

Thanks for the reply, and the export suggestion - i will investigate that long term though for a large scale site that can't really afford downtime it may be slightly more complex, i'll look into the technicalities.

In the mean time as i don't actually need to use the document/video part in the media i have suppressed the driver, contentpart and handler and this is working as a temporary fix.