Imagine being paid to improve your favorite CMS!

It could be you! Umbraco HQ are hiring and are looking for both talents and senior developers. Wonderful workplace, friendly colleagues and competitive salary.

Copied to clipboard

Flag this post as spam?

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


  • Lee Kelleher 3677 posts 13273 karma points admin core mvp c-trib
    Jul 05, 2012 @ 14:50
    Lee Kelleher
    8

    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!

    • Download a Lucene.Net v2.9.2.2 - if you can't find this, then we've put a copy on our CodePlex page.
    • Create a new folder inside your /bin folder called "legacy", then put "Lucene.Net.dll" inside the new /bin/legacy folder.
    • In the root of your website, open the Web.config file in your favourite text-editor.
    • Scroll down the file until you find the <runtime> section. Then add this XML snippet inside it:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="Lucene.Net" />
            <codeBase version="2.9.2.2" href="bin\legacy\Lucene.Net.dll" />
            <codeBase version="2.9.4.1" href="bin\Lucene.Net.dll" />
        </dependentAssembly>
    </assemblyBinding>
    

    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.

  • Petr Snobelt 923 posts 1531 karma points
    Jul 09, 2012 @ 12:27
    Petr Snobelt
    0

    What about downloading sources of Lucene.Net and compile it without strong name?

  • Lee Kelleher 3677 posts 13273 karma points admin core mvp c-trib
    Jul 09, 2012 @ 12:39
    Lee Kelleher
    0

    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.

  • Jan Skovgaard 10758 posts 21132 karma points admin mvp c-trib
    Aug 10, 2012 @ 23:13
    Jan Skovgaard
    0

    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: 

    [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? ;-)

    Cheers,
    Jan 

  • Jan Skovgaard 10758 posts 21132 karma points admin mvp c-trib
    Aug 11, 2012 @ 00:07
    Jan Skovgaard
    0

    Hi Lee

    Nevermind me, obviously I did not read the post thouroughly enough. #H5IS :-)

    All working like a charm now.

    /Jan

  • firepol 125 posts 172 karma points
    Aug 21, 2012 @ 16:09
    firepol
    2

    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.

  • Dan Diplo 1080 posts 3732 karma points mvp
    Aug 22, 2012 @ 16:51
    Dan Diplo
    0

    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?

  • Lee Kelleher 3677 posts 13273 karma points admin core mvp c-trib
    Aug 22, 2012 @ 17:03
    Lee Kelleher
    0

    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.

  • Dan Diplo 1080 posts 3732 karma points mvp
    Aug 22, 2012 @ 21:47
    Dan Diplo
    0

    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. 

  • Lee Kelleher 3677 posts 13273 karma points admin core mvp c-trib
    Aug 22, 2012 @ 21:57
    Lee Kelleher
    0

    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.

  • Anthony Candaele 1197 posts 2048 karma points
    Sep 05, 2012 @ 10:30
    Anthony Candaele
    1

    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

  • higgsy 65 posts 92 karma points
    Sep 14, 2012 @ 15:02
    higgsy
    0

    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

  • Simon Dingley 1201 posts 2718 karma points
    Sep 14, 2012 @ 15:10
    Simon Dingley
    1

    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:

  • Janet Kirklen 99 posts 198 karma points
    Sep 18, 2012 @ 00:08
    Janet Kirklen
    0

    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.

  • Funka! 398 posts 659 karma points
    Sep 18, 2012 @ 01:04
    Funka!
    0

    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!

     

  • Funka! 398 posts 659 karma points
    Sep 18, 2012 @ 01:14
    Funka!
    0

    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!

  • Iain Martin 43 posts 64 karma points
    Sep 19, 2012 @ 10:31
    Iain Martin
    0

    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.

  • Sebastian Dammark 464 posts 1058 karma points
    Oct 04, 2012 @ 20:13
    Sebastian Dammark
    0

    I have an umbraco 4.9 running with uComponents 4.1.

    Should I undo the workaround if I upgrade to uComponents 5.0 ?

  • Lee Kelleher 3677 posts 13273 karma points admin core mvp c-trib
    Oct 04, 2012 @ 20:18
    Lee Kelleher
    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.

  • Anthony Candaele 1197 posts 2048 karma points
    Oct 18, 2012 @ 10:08
    Anthony Candaele
    0

    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

  • Simon Dingley 1201 posts 2718 karma points
    Oct 18, 2012 @ 10:12
    Simon Dingley
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft