Yes, I touched the web.config to restart the application pool.
The search stopped working, so to try to fix that we tried the Examineindexadmin_1.0 package to rebuild the examine indexes. The package didn't work, there were errors on the dashboard tab, and was uninstalled, but now the error from uComponents data types is making all pages with any uComponents property throw errors. Deleting the ExamineIndexes folders a few times and restarting the site got the search working, but now we are stuck with this error.
As Jan asks, was anything changed on your website before this error started to appear?
Which uComponents data-type are you using?
The only time that I've seen the KeyNotFoundException error is when someone upgraded uComponents to the latest version that didn't support their older version of Umbraco (e.g. uComponents 4.0 on Umbraco 4.7.1).
Server Error in '/' Application.
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
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.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
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:
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
System.Reflection.RuntimeModule.GetTypes() +4
System.Reflection.Assembly.GetTypes() +78
uComponents.Core.Install.uComponentsInstaller.Page_Init(Object sender, EventArgs e) +47
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnInit(EventArgs e) +91
System.Web.UI.UserControl.OnInit(EventArgs e) +83
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.presentation.developer.packages.Installer.processInstall(String currentStep) +951
umbraco.presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e) +549
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +91
umbraco.BasePages.BasePage.OnLoad(EventArgs e) +49
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1025
I put back the original 2.1 dll and everything seems the same.
Yes, all other data types are working, I checked. I see under Installed packages uComponents 3 times, if I uninstall all and install 2.1, the existing data types will not be affected, right?
No, don't uninstall the uComponents packages ... it will destroy any associated data.
The 3 installed packages are just for display purposes only anyway - you can either leave them as they are ... or if you want to edit the /App_Data/packages/installed/installedPackages.config XML file, you can manually remove the extra entries.
DataTypes from DataTypesResolver, before returning Values, calls EnsureRefreshersList(); from LegacyTransientObjectsResolver which is
/// <summary>
/// Populates the refreshers dictionary to allow us to instantiate a type by Id since the ICacheRefresher type doesn't contain any metadata
/// </summary>
protected void EnsureRefreshersList()
{
using (var l = new UpgradeableReadLock(_lock))
{
if (_trackIdToType == null)
{
l.UpgradeToWriteLock();
_trackIdToType = new ConcurrentDictionary<Guid, Type>();
foreach (var v in Values)
{
_trackIdToType.TryAdd(GetUniqueIdentifier(v), v.GetType());
}
}
}
}
What the DataTypesResolver does is keep a list of all the loaded data-type editor-controls (e.g. Multi-Node Tree Picker) and the GUID/ID for that editor-control (e.g. MNTP's GUID is "C2D6894B-E788-4425-BCF2-308568E3D38B").
When the content edit screen is being loaded it will try to look up the editor-controls it needs via the "key" (e.g. the GUID).
So in the case where you are getting the KeyNotFoundException error, it is because the GUID can not be found in the look up.
Which suggests that it can not be loaded in the first place :-(
Yeah, Umbraco core uses reflection to find the data-type editor-controls. If they aren't being listed in the "Render Control" dropdown, then something else is going on.
How comfortable are you with HTML? Could you do a view-source for around the "Render Control" dropdown? See if there are any error messages within the HTML?
Your reply got me the idea to replace all assemblies with ones from another site which I learned uses the same codebase (I don't have the source project), and uComponents are working again! :)
Umbraco 4.5.2 uComponents 2.1 errors
Hello,
In an older site on U 4.5.2 all data types based on uComponents 2.1 started throwing the error
Any suggestions?
Thanks!
Hi Bogdan
What changes was made to the site before this started to happen?
Have you tried to simply recycle the app pool and see if it helps?
/Jan
Hi Jan,
Yes, I touched the web.config to restart the application pool.
The search stopped working, so to try to fix that we tried the Examineindexadmin_1.0 package to rebuild the examine indexes. The package didn't work, there were errors on the dashboard tab, and was uninstalled, but now the error from uComponents data types is making all pages with any uComponents property throw errors. Deleting the ExamineIndexes folders a few times and restarting the site got the search working, but now we are stuck with this error.
Thanks, Bogdan
Hi Bogdan,
As Jan asks, was anything changed on your website before this error started to appear?
Which uComponents data-type are you using?
The only time that I've seen the
KeyNotFoundException
error is when someone upgraded uComponents to the latest version that didn't support their older version of Umbraco (e.g. uComponents 4.0 on Umbraco 4.7.1).See the compatibility matrix for more details:
http://ucomponents.org/compatibility/
It might be worth upgrading to uComponents v3.1.2? (as that works on Umbraco v4.5.2)
Cheers,
- Lee
Hi Lee,
The uComponents version is 2.1.
The data types used are Multi-Node Tree Picker and URL Picker.
As for the changes made prior to the error, as far as I know only what I wrote above. I will try to upgrade to 3.1.2 and see if it helps.
Thanks!
Just to rule this out... can you check if the
uComponents.Core.dll
is in your /bin folder?Thanks,
- Lee
It is definitely there. File version 2.1.0.0.
Thanks,
Bogdan
I noticed in installedPackages.config
package id="10" version="2.1" url="" name="uComponents" folder="6e67d7b5-af1f-4814-8c7c-9bd3393b7f05"
but I don't see the 6e67d7b5-af1f-4814-8c7c-9bd3393b7f05 folder. Could this be it?
No, the folder GUID is only for the package installation. Hmmm, I'm not sure what could be causing that error.
Maybe it is worth trying to upgrade uComponents to v3.1.2?
http://ucomponents.codeplex.com/releases/view/90019
Do make a backup of your current version of
uComponents.Core.dll
- in case you need to revert it back.Good luck!
Cheers,
- Lee
Ok, trying it right now. Should I install the package, or just overwrite the dll?
Thanks, Bogdan
Installing the package is fine.
Got an error from package installation :(
Thanks, Bogdan
I see that the new dll did make it to the bin folder, but the KeyNotFoundException is the same.
uh oh, that's not good - I'd copy back the original
uComponents.Core.dll
- just to be on the safe side.I'm not sure what to advise next. I can't see how the uComponents data-types suddenly broke. Feels like something else is at play here.
What other packages (specifically data-type ones) do you have installed? Are those ones still working?
I put back the original 2.1 dll and everything seems the same.
Yes, all other data types are working, I checked. I see under Installed packages uComponents 3 times, if I uninstall all and install 2.1, the existing data types will not be affected, right?
Thanks!
No, don't uninstall the uComponents packages ... it will destroy any associated data.
The 3 installed packages are just for display purposes only anyway - you can either leave them as they are ... or if you want to edit the
/App_Data/packages/installed/installedPackages.config
XML file, you can manually remove the extra entries.What do you know about the exception KeyNotFoundException from
? I mean, what key and what dictionary are we talking about? I don't know where to find the U 4.5.2 source to start looking, but from here http://umbraco.codeplex.com/SourceControl/latest#src/umbraco.cms/businesslogic/datatype/factory.cs it seems that the DataEditorId is missing from DataTypesResolver.Current.DataTypes.ToArray()
Thanks!
DataTypes from DataTypesResolver, before returning Values, calls EnsureRefreshersList(); from LegacyTransientObjectsResolver which is
... and I'm lost.
What the
DataTypesResolver
does is keep a list of all the loaded data-type editor-controls (e.g. Multi-Node Tree Picker) and the GUID/ID for that editor-control (e.g. MNTP's GUID is "C2D6894B-E788-4425-BCF2-308568E3D38B
").When the content edit screen is being loaded it will try to look up the editor-controls it needs via the "key" (e.g. the GUID).
So in the case where you are getting the
KeyNotFoundException
error, it is because the GUID can not be found in the look up.Which suggests that it can not be loaded in the first place :-(
How are the data-type editor-controls GUIDs loaded? Reflection? If I try to make a new data type, there are no uComponenents under "Render control".
Thanks!
Yeah, Umbraco core uses reflection to find the data-type editor-controls. If they aren't being listed in the "Render Control" dropdown, then something else is going on.
How comfortable are you with HTML? Could you do a view-source for around the "Render Control" dropdown? See if there are any error messages within the HTML?
Thanks,
- Lee
Your reply got me the idea to replace all assemblies with ones from another site which I learned uses the same codebase (I don't have the source project), and uComponents are working again! :)
Thanks a lot Lee!
Excellent news that you resolved it! :-)
is working on a reply...