Upgrading to Umbraco 4.8 breaks support for uComponents
Important notice: If you are using uComponents v3.1.2 (or below), then upgrading to Umbraco 4.8 will break support for specific areas of uComponents.
What is the problem? Why does it break?
As part of the effort to upgrade all 3rd-party dependencies for the Umbraco 4.8.0 release, we found that the version of Lucene.Net we were using, (v2.9.2.2), did not fully support Medium Trust. To correct this we upgrade to the latest version of Lucene.Net (v2.9.4.1) which does support Medium Trust.
However the latest version (v2.9.4.1) is now a Strong-Named assembly - meaning that any code/project that uses that assembly must compile against that specific version. Since uComponents compiles against the older version (v2.9.2.2), which is "weak-named", any references to Lucene.Net are broken - and an exception/error is thrown.
Which parts of uComponents break in Umbraco 4.8+?
At a technical-level, any parts of Umbraco that use Reflection against the uComponents assembly will break. These are:
uComponents Installer (post-install user-control)
DataType's "Render Control" drop-down list (within a PreValue Editor)
Content/Media's Edit screen
You will see one of the following exception/error messages:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Parameter name: Property [alias] (1234) on Content Type [alias] could not be retrieved for Document 1234 on Tab Page [alias]. To fix this problem, delete the property and recreate it.
What are our options? How can we fix this?
Our options are:
Release new version of uComponents to support latest Lucene.Net (and Umbraco 4.8) - already planned, see more details here.
Apply a workaround solution...
So what is the a workaround?
Okay, the workaround solution isn't very pretty and will require you to download a file and edit your Web.config - easy for a developer, but headache for everyone else!
We did explore that option - while it would work - we came to the conclusion that going-forwards we would need to maintain a weak-named version of Lucene.Net source-code/assembly. That could become a burden to the core team. We agreed to take the hit, break backwards-compatibility and support the strong-named (official) release.
(As much as I hate breaking backwards-compatibility, it felt like the right choice to make)
It seems that if you upgrade from Umbraco 4.7.2 to 4.8 there is a problem with the MTNP datatype. I get a YSOD on all of my nodes with this stack trace
Value cannot be null. Parameter name: Property mainBanner (134) on Content Type Forside could not be retrieved for Document 1054 on Tab Page Grafik. To fix this problem, delete the property and recreate it.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: Property mainBanner (134) on Content Type Forside could not be retrieved for Document 1054 on Tab Page Grafik. To fix this problem, delete the property and recreate it.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentNullException: Value cannot be null.
Parameter name: Property mainBanner (134) on Content Type Forside could not be retrieved for Document 1054 on Tab Page Grafik. To fix this problem, delete the property and recreate it.]
umbraco.controls.ContentControl.CreateChildControls() +1104
System.Web.UI.Control.EnsureChildControls() +102
umbraco.controls.ContentControl.OnInit(EventArgs e) +32
System.Web.UI.Control.InitRecursive(Control namingContainer) +140
System.Web.UI.Control.AddedControl(Control control, Int32 index) +197
System.Web.UI.ControlCollection.Add(Control child) +79
umbraco.cms.presentation.editContent.OnInit(EventArgs e) +1250
System.Web.UI.Control.InitRecursive(Control namingContainer) +140
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480
I'm using the about 3-4 instances of the MNTP and recreating the properties is not really an option for me. However I heard a guy say something about it's a matter of updating 4 digits in the guid in the database - can you confirm this and eventually what a DB n00b like me should do? ;-)
If you, like me, are trying to upgrade from 4.7.x (with uComponents 3.1.0 installed) to 4.8.1 you may need to pay attention to these details:
as explained above, insert that xml snippet about the legacy lucene.net in your web.config
upgrade by overwriting (as explained in the upgrade notice) the old umbraco files and manually merging* the sensitive ones (config\*.config) . *Personally I always use a comparison tool to check what's changed in the config and we.config files... I suggest you to do the same.
browse your umbraco and proceed with the upgrade (you are redirected to the backend/upgrade page), if you, like me, are using a separate user for your db, do not forget to grant that user "db owner" privileges, else you'll be stuck at 35% of the db upgrade...
after the upgrade is done, go in the backend, install uComponents 5 (5.0 alpha 2 at the moment of writing this comment, tested and it works in my case). You may get an error (yellow screen of death) at the end... no panic...
go under app_data\packages\installed\installedPackages.config do a backup of that file and remove all the xml block about uComponents 3.1
under the web.config, find the references (add name...) to "uComponentsModule" (in my web.config I had 2) and comment them (in my case I got errors because of references to those)
under config\xsltExtensions.config comment all the uComponents references
if you still get error parsing xslt, add to the url this querystring to see what is causing the problem: ?umbdebugshowtrace=true I personally had a problem with html agility pack and had to overwrite the new version of the dll with the 1.3.0 version (I tried to add in web.config a reference to legacy, as for lucene, but still htmlagilitypack 1.3.0 was not found... so I had to overwrite the 1.4.5 version with version 1.3.0 directly under the bin folder, and get rid of the one -not found- under legacy, then it worked)
That's it. It was a painful upgrade (I needed several hours but with this guide you may need half an hour / maximum 1 hour if you take it slowly) and I'm surprised nobody documented those problems, so hopefully this post will help somebody. Good luck.
Can you confirm whether 4.xx and 3.xx versions of uComponents both don't work with 4.8? Because on the uComponents homepage it says:
"Installing uComponents versions 3.x and 4.x will not work with Umbraco 4.8+"
However, in this post it says:
"If you are using uComponents v3.1.2 (or below), then upgrading to Umbraco 4.8 will break support for specific areas of uComponents."
If no current versions of uComponents work with 4.8 then can I ask why this decision was made? Because uComponents is a very popular package so not being able to use it with 4.8 seems to be a regressive step. When can we expect a version that does?
All versions of uComponents (v4, v3, and even v2, v1) will all work with Umbraco 4.8.x if the workaround patch is applied.
Reason for the message on the project's homepage is that the text used there is also used within the Umbraco back-office package repository. So for anyone who doesn't use the forum or twitter, etc, then they at least get forewarning about the breaking support.
The post mentions v3.1.2 as that was the current release at the time (v4.0 wasn't released then).
Not sure what decision you mean? It was beyond the control of the uComponents team. The decision to upgrade Lucene.Net in the Umbraco core was made for Examine to fully support Medium Trust, (which I totally agree with - it's a must have!)
As for a version of uComponents that supports Umbraco 4.8+ - v5.0 is already planned (and linked to in the post above) - scheduled for release on 7th September 2012.
Thanks for the clarification - I thought that was the case, just wanted to be sure.
Regarding my question about "why the decision was made to release 4.8 when it wouldn't work with uComponents". I realise this is not down to you, and was a HQ decision - but I know you are in close contact with HQ so wondered if you knew why the release of 4.8 didn't wait until uComponents could have been updated? I guess I'm asking the wrong person, but I'm just curious, because it seems a bit of an "own goal" on their part.
To be fair, it was my involvement on both parts. For Umbraco 4.8, I'd upgraded most of the dependencies, which uncovered that Examine/Lucene.Net didn't work in Medium Trust - hence why we upgraded them. (Ultimately it wasn't HQ, but a core team decision)
With uComponents, we'd already roadmapped the v4.x (to support Umbraco 4.6 for newer NodeFactory API) and a v5.x (to separate the components into their own assemblies). But there is only so much time that I can commit to these projects - thus the delays.
So far the workaround solution has worked for most people - there has been some who aren't upgrading to 4.8.x until we support it properly ... which will happen in about 2 weeks time ... and all this headache will soon become a distant memory. :-)
Can I just ask - does this also apply when installing a fresh instance of Umbraco 4.9.0? The only reason I ask is that I was under the impression that uComponents was now part of the Umbraco core, but after installing 4.9 I don't see any of the uComponent controls that I'm used to seeing when creating a new data type, is it just a couple of the controls that have been built into the core, and if so do I need to still go through the upgrade instructions above?
Some of the uComponents controls were moved to part of the Core however not all of them so you will still need to install uComponents in order make use of all of the other datatypes. Make sure you get the correct version of uComponents for your installation or apply the necessary workaround.
I just installed 4.9.0 and I had the same confusion on this. Only part of the uComponents are native to 4.9.0. When you look at your list of datatypes you will find:
Multi-Node Tree Picker, Multiple Textstring, Slider and XPath Lists
Since there are other uComponent datatypes I wanted I went ahead and installed the package (uComponents 4.1.0). On installation I got the error decribed in this thread and none of the new datatypes were in the dropdown list when trying to create a uComponent datatype.
Unable to load one or more of the requested types.Retrieve the LoaderExceptions property for more information.
However, following the patch instructions on this post fixed the problem and uComponents are now showing. I added a few and everything seems fine and my Umbraco project is a happy place again.
To avoid any unhappines, if you are installing 4.8.0+ then follow the compatibility grid on the uComponents homepage and install 5.0.0 which works and does not generate the error above.
We are using the version 5.0.0 (beta) of uComponents on Umbraco 4.9.0 which is working great.
I believe the version of uComponents you installed is indicated as not compatible with Umbraco 4.8.0 and above. Check the version compatibility grid here : https://ucomponents.codeplex.com/ , then go into Downloads and give 5.0.0 a try!
Sorry Janet, didn't see your last line there in your post indicating that you were already aware of uComponent 5.0.0 (beta) being the recommended release. Nonetheless glad you were able to get it working!
I had to install V5.0 into a site that was being upgraded from Umbraco 4.7 to 4.9. The work arounds just didn't work for me, I'm afraid, so I had to rip out uComponents 4.x and install V5.0
Pretty painfull all round I have to say, and I can hear my colleague muttering under his breath as he is attempting to do the same thing :-)
Sometimes I guess you just have to take the hit and break things to make them work better going forwards.
Upgrading to Umbraco 4.8 breaks support for uComponents
Important notice: If you are using uComponents v3.1.2 (or below), then upgrading to Umbraco 4.8 will break support for specific areas of uComponents.
What is the problem? Why does it break?
As part of the effort to upgrade all 3rd-party dependencies for the Umbraco 4.8.0 release, we found that the version of Lucene.Net we were using, (v2.9.2.2), did not fully support Medium Trust. To correct this we upgrade to the latest version of Lucene.Net (v2.9.4.1) which does support Medium Trust.
However the latest version (v2.9.4.1) is now a Strong-Named assembly - meaning that any code/project that uses that assembly must compile against that specific version. Since uComponents compiles against the older version (v2.9.2.2), which is "weak-named", any references to Lucene.Net are broken - and an exception/error is thrown.
Which parts of uComponents break in Umbraco 4.8+?
At a technical-level, any parts of Umbraco that use Reflection against the uComponents assembly will break. These are:
You will see one of the following exception/error messages:
What are our options? How can we fix this?
Our options are:
So what is the a workaround?
Okay, the workaround solution isn't very pretty and will require you to download a file and edit your Web.config - easy for a developer, but headache for everyone else!
Now, when you reload your Umbraco back-office, all your uComponents parts will be working as per normal.
If you have any problems and/or concerns, please let us know - we're here to help.
Regards, Lee.
What about downloading sources of Lucene.Net and compile it without strong name?
Hi Petr,
We did explore that option - while it would work - we came to the conclusion that going-forwards we would need to maintain a weak-named version of Lucene.Net source-code/assembly. That could become a burden to the core team. We agreed to take the hit, break backwards-compatibility and support the strong-named (official) release.
(As much as I hate breaking backwards-compatibility, it felt like the right choice to make)
Thanks, Lee.
Hi Lee
It seems that if you upgrade from Umbraco 4.7.2 to 4.8 there is a problem with the MTNP datatype. I get a YSOD on all of my nodes with this stack trace
Value cannot be null.
Parameter name: Property mainBanner (134) on Content Type Forside could not be retrieved for Document 1054 on Tab Page Grafik. To fix this problem, delete the property and recreate it.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: Property mainBanner (134) on Content Type Forside could not be retrieved for Document 1054 on Tab Page Grafik. To fix this problem, delete the property and recreate it.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
I'm using the about 3-4 instances of the MNTP and recreating the properties is not really an option for me. However I heard a guy say something about it's a matter of updating 4 digits in the guid in the database - can you confirm this and eventually what a DB n00b like me should do? ;-)
Cheers,
Jan
Hi Lee
Nevermind me, obviously I did not read the post thouroughly enough. #H5IS :-)
All working like a charm now.
/Jan
If you, like me, are trying to upgrade from 4.7.x (with uComponents 3.1.0 installed) to 4.8.1 you may need to pay attention to these details:
That's it. It was a painful upgrade (I needed several hours but with this guide you may need half an hour / maximum 1 hour if you take it slowly) and I'm surprised nobody documented those problems, so hopefully this post will help somebody. Good luck.
Can you confirm whether 4.xx and 3.xx versions of uComponents both don't work with 4.8? Because on the uComponents homepage it says:
"Installing uComponents versions 3.x and 4.x will not work with Umbraco 4.8+"
However, in this post it says:
"If you are using uComponents v3.1.2 (or below), then upgrading to Umbraco 4.8 will break support for specific areas of uComponents."
If no current versions of uComponents work with 4.8 then can I ask why this decision was made? Because uComponents is a very popular package so not being able to use it with 4.8 seems to be a regressive step. When can we expect a version that does?
Hi Dan, (eagle-eyes)
All versions of uComponents (v4, v3, and even v2, v1) will all work with Umbraco 4.8.x if the workaround patch is applied.
Reason for the message on the project's homepage is that the text used there is also used within the Umbraco back-office package repository. So for anyone who doesn't use the forum or twitter, etc, then they at least get forewarning about the breaking support.
The post mentions v3.1.2 as that was the current release at the time (v4.0 wasn't released then).
Not sure what decision you mean? It was beyond the control of the uComponents team. The decision to upgrade Lucene.Net in the Umbraco core was made for Examine to fully support Medium Trust, (which I totally agree with - it's a must have!)
As for a version of uComponents that supports Umbraco 4.8+ - v5.0 is already planned (and linked to in the post above) - scheduled for release on 7th September 2012.
Cheers, Lee.
Hi Lee,
Thanks for the clarification - I thought that was the case, just wanted to be sure.
Regarding my question about "why the decision was made to release 4.8 when it wouldn't work with uComponents". I realise this is not down to you, and was a HQ decision - but I know you are in close contact with HQ so wondered if you knew why the release of 4.8 didn't wait until uComponents could have been updated? I guess I'm asking the wrong person, but I'm just curious, because it seems a bit of an "own goal" on their part.
To be fair, it was my involvement on both parts. For Umbraco 4.8, I'd upgraded most of the dependencies, which uncovered that Examine/Lucene.Net didn't work in Medium Trust - hence why we upgraded them. (Ultimately it wasn't HQ, but a core team decision)
With uComponents, we'd already roadmapped the v4.x (to support Umbraco 4.6 for newer NodeFactory API) and a v5.x (to separate the components into their own assemblies). But there is only so much time that I can commit to these projects - thus the delays.
So far the workaround solution has worked for most people - there has been some who aren't upgrading to 4.8.x until we support it properly ... which will happen in about 2 weeks time ... and all this headache will soon become a distant memory. :-)
Cheers, Lee.
Just applied the workaround and it works great. My v4.7.2 site is now successfully upgrade to 4.8.0 and 4.8.1
Thanks Lee,
Anthony
Hi all,
Can I just ask - does this also apply when installing a fresh instance of Umbraco 4.9.0? The only reason I ask is that I was under the impression that uComponents was now part of the Umbraco core, but after installing 4.9 I don't see any of the uComponent controls that I'm used to seeing when creating a new data type, is it just a couple of the controls that have been built into the core, and if so do I need to still go through the upgrade instructions above?
Thanks in advance
Al
Some of the uComponents controls were moved to part of the Core however not all of them so you will still need to install uComponents in order make use of all of the other datatypes. Make sure you get the correct version of uComponents for your installation or apply the necessary workaround.
See the following:
I just installed 4.9.0 and I had the same confusion on this. Only part of the uComponents are native to 4.9.0. When you look at your list of datatypes you will find:
Since there are other uComponent datatypes I wanted I went ahead and installed the package (uComponents 4.1.0). On installation I got the error decribed in this thread and none of the new datatypes were in the dropdown list when trying to create a uComponent datatype.
However, following the patch instructions on this post fixed the problem and uComponents are now showing. I added a few and everything seems fine and my Umbraco project is a happy place again.
To avoid any unhappines, if you are installing 4.8.0+ then follow the compatibility grid on the uComponents homepage and install 5.0.0 which works and does not generate the error above.
Hi Janet,
We are using the version 5.0.0 (beta) of uComponents on Umbraco 4.9.0 which is working great.
I believe the version of uComponents you installed is indicated as not compatible with Umbraco 4.8.0 and above. Check the version compatibility grid here : https://ucomponents.codeplex.com/ , then go into Downloads and give 5.0.0 a try!
Best of luck to you!
Sorry Janet, didn't see your last line there in your post indicating that you were already aware of uComponent 5.0.0 (beta) being the recommended release. Nonetheless glad you were able to get it working!
I had to install V5.0 into a site that was being upgraded from Umbraco 4.7 to 4.9. The work arounds just didn't work for me, I'm afraid, so I had to rip out uComponents 4.x and install V5.0
Pretty painfull all round I have to say, and I can hear my colleague muttering under his breath as he is attempting to do the same thing :-)
Sometimes I guess you just have to take the hit and break things to make them work better going forwards.
I have an umbraco 4.9 running with uComponents 4.1.
Should I undo the workaround if I upgrade to uComponents 5.0 ?
Hi Sebastian,
Sure, the workaround can safely be removed once you've upgraded to v5.x ... and if you did leave it in place, no worries - it wont cause any harm.
Cheers, Lee.
I just have overwitten uComponent 4 with uComponents 5.0 but now all my .cshtml scripts where I access MNTP data are broken.
Any ideas?
Thanks for your help,
Anthony
First I'd suggest checking the actual error message by appending umbdebugshowtrace=true onto your url. I suspect it is related to a dependency issue.
is working on a reply...