Umbraco 7.2.1 backend broken after installing Linked Content Data Type.
This package seemed promising for a particular need I have at a customer's website, but the backend crashed when your .dll was installed.
The backend was unable to lazyload a resource. The server returned a YSOD with an error 500, unable to load System.Web.Mvc. (Removing your .dll solved the problem.) This resulted in the browser showing nothing
I'm glad I didn't attempt this on their live-site, but tried it first on my localhost :)
I posted a fixed dll when browsing the document type and media type trees. The error you are having look like it is unrelated though. This is bound to Mvc 5.2.3 but Umbraco 7.2 uses Mvc 4. It may be possible to get it to load properly by updating the Mvc binding redirect in the web.config but I haven't tested it.
Your suggestion got us a little closer, but not quite there yet. The Umbraco backend is not entirely broken anymore. I was able to create the data type and add it to my document type.
However, when I open a document with the Linked Content data type, I get the following error:
Received an error from the server
Failed to retrieve data
Could not load file or assembly 'System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
EXCEPTION DETAILS:
System.IO.FileLoadException: Could not load file or assembly 'System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
STACKTRACE:
at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.InitializeProperties(MethodInfo methodInfo)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor..ctor(HttpControllerDescriptor controllerDescriptor, MethodInfo methodInfo)
at System.Web.Http.Controllers.ApiControllerActionSelector.ActionSelectorCacheItem..ctor(HttpControllerDescriptor controllerDescriptor)
at System.Web.Http.Controllers.ApiControllerActionSelector.<>c__DisplayClass2.<GetInternalSelector>b__0(Object _)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at System.Web.Http.Controllers.ApiControllerActionSelector.GetInternalSelector(HttpControllerDescriptor controllerDescriptor)
at System.Web.Http.Controllers.ApiControllerActionSelector.SelectAction(HttpControllerContext controllerContext)
at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsyncInternal(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
You can make the same change indicated for the System.Web.Mvc binding to the System.Web.Http one, and possibly System.Net.Http.Formatting as well in the web.config.
What this configs change is doing is telling the system to just use the v4 assemblies when some dll tries to load v5.2.3.
That's awesome. It runs on my localhost 7.2.1, without any changes to the web.config.
However, a new issue appeared.
I'm getting the following error, when I click the "Show Items"-button.
Received an error from the server
Failed to retrieve data
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'.
EXCEPTION DETAILS:
System.InvalidOperationException: The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'.
STACKTRACE:
Umbraco 7.2.1 backend broken after installing Linked Content Data Type.
This package seemed promising for a particular need I have at a customer's website, but the backend crashed when your .dll was installed.
The backend was unable to lazyload a resource. The server returned a YSOD with an error 500, unable to load System.Web.Mvc. (Removing your .dll solved the problem.) This resulted in the browser showing nothing
I'm glad I didn't attempt this on their live-site, but tried it first on my localhost :)
I posted a fixed dll when browsing the document type and media type trees. The error you are having look like it is unrelated though. This is bound to Mvc 5.2.3 but Umbraco 7.2 uses Mvc 4. It may be possible to get it to load properly by updating the Mvc binding redirect in the web.config but I haven't tested it.
Thank you for your quick reply!
Your suggestion got us a little closer, but not quite there yet. The Umbraco backend is not entirely broken anymore. I was able to create the data type and add it to my document type.
However, when I open a document with the Linked Content data type, I get the following error:
Have any good ideas as to how to solve this?
You can make the same change indicated for the System.Web.Mvc binding to the System.Web.Http one, and possibly System.Net.Http.Formatting as well in the web.config.
What this configs change is doing is telling the system to just use the v4 assemblies when some dll tries to load v5.2.3.
Ie:
Thank you again. That led me to another error :)
I'm sorry for the trouble, hope you know how to deal with this one too.
Yah, its not going to work then, It's trying to use code from Mvc5 witch isn't available until Umbraco 7.3.
All right, that is too bad. Thank you for trying anyway.
Would you be willing to share your source code? Then I could at least make my own 7.2.x compatible build.
I'll build the package against 7.2. It may work without needing customizations.
That's even better, thanks a lot! Looking forward to it.
This version should work in 7.2 and won't need the binding redirects.
https://our.umbraco.org/FileDownload?id=16276
I don't have 7.2 installed so I didn't actually test it though :P
That's awesome. It runs on my localhost 7.2.1, without any changes to the web.config.
However, a new issue appeared.
I'm getting the following error, when I click the "Show Items"-button.
I posted a new version of this package for Umbraco 7.2.
https://our.umbraco.org/FileDownload?id=16277
I have tested this with a clean 7.2 install and it works fine so it should work on any patch release.
This also adds basic support for content in Grid properties.
It works perfectly, thank you so much!
is working on a reply...