I upgraded several webs on 4.1beta. All of them are using "Multiple File Upload" and are working perfectly fine.
But on one I get the ASP.NET-error "Key not found in dictonary whenever I try to show a media-folder. If I remove the usercontroll (Mulitple File Upload) everything works fine. I already tried to uninstall and install again - samer error. I checked the DB and couldn't find anything unusual.
At what point is that "dictonary" build and where is it fetching its values from? Why can't the usercontroll be rendered, I guess its not part of the dictonary, but should be.
You could check if the datatype has all of the required properties set, maybe there's something missing or one of the properties is pointing to a node that doesn't exist any more.
Where could I find the required props? The datatype only has on empty prevalue which is optional. And where could I look for this "thing" pointing at a nonexist node? I allready checked cmsDataType and umbracoNode and couldn't find anything suspicous.
Ah, that's what I meant, the prevalue. Hmmm, in that case you might want to start having a look at the source of the Multiple File Upload and check out where this key is coming from and what it's used for.
I don't think it the Umbraco dictionary that is missing something here. The Multiple File Upload is using "System.Collections.Generic.Dictionary" here.
I am not familiar enough with the source, so I have no idea where the key is supposed to come from. So have a look at the filename you got with this exception and have a look at the source to see what it's expecting here.
This datatype is registered using a new GUID during the install of the package. It seems that the GUID is not found in cmsDatatype, the controlId should be: ACCB9911-CD81-4B17-AF3F-446CEB1DBF0D
If it's not there, you might want to run the installed for the Multile File uploader again (make sure to backup before you do so).
Already looked into this, but the cmsDataType with this GUID is present and points to the correct umbracoNode. This can't be the issue I guess. :-( It dbType is Ntext - guess that's ok?
GUID is identical and already changed dbType to Nvarchar... didn't help. I already uninstalled and installed the package several times. But - maybe this helps - when I install the package using the installer I get the following error:
After the package installation is run, the local installer of MFU asks if I want to do an automatic installation. If I use it it get this:
Der angegebene Schlüssel war nicht im Wörterbuch angegeben.
Beschreibung: Unbehandelte
Ausnahme beim Ausführen der aktuellen Webanforderung. Überprüfen Sie
die Stapelüberwachung, um weitere Informationen über diesen Fehler
anzuzeigen und festzustellen, wo der Fehler im Code verursacht wurde.
Ausnahmedetails: System.Collections.Generic.KeyNotFoundException: Der angegebene Schlüssel war nicht im Wörterbuch angegeben.
Just checked cmsDatatype. Nothing odd on the first glance, no empty controlID, everything looks fine. But I don't know what controll hides behind each GUID. Is there a list of all the GUIDs and the connected GUID? Maybe on is missing and becaus of that .GetAll() won't give me all controlls.
This Umbraco installation came a long way from 3.0.x to 4.0.x to 4.1 and it still had an umbracoNode-defintion for the mass-mailer in umbracoNode and cmdDataType. I ersaed both lines from the database and (I just don't know why) everything is working perfeclty!
@Seba: Thanx for your time and support! You pointed me in the right direction!
Ahaaa, it's the other way around than what I thought.
But now I'm thinking that maybe your database wasn't corrupt, but the massmailer DLL was removed. Maybe the GetAll method actually tests if the registered GUID is still also loaded in memory somewhere?
It seems to me that you should be able to delete a dll file without wrecking the rest of the packages... Can you confirm that you removed the massmailer from the bin folder? In that case, this might be a bug.
I don't know if this is related but I also have the similar problem with my own user controls in Umbraco backoffice:( I created my own section where I'm trying a simple gridview with update/delete/cancel functionality. On postback if I check the datakeys or selectedDatakey value...they are both empty. I tested my usercontrol in Umbraco public frontend and it works perfect.
Is there something that you have to do different if the user control is used in the backoffice?
Usercontrol gives "Key not in Dictonary"
Hello,
I upgraded several webs on 4.1beta. All of them are using "Multiple File Upload" and are working perfectly fine.
But on one I get the ASP.NET-error "Key not found in dictonary whenever I try to show a media-folder. If I remove the usercontroll (Mulitple File Upload) everything works fine. I already tried to uninstall and install again - samer error. I checked the DB and couldn't find anything unusual.
At what point is that "dictonary" build and where is it fetching its values from? Why can't the usercontroll be rendered, I guess its not part of the dictonary, but should be.
Any ideas?
Greets, Arnim.
That's the error-stack:
You could check if the datatype has all of the required properties set, maybe there's something missing or one of the properties is pointing to a node that doesn't exist any more.
Hey Seba! You're a fast one! Thanx!
Where could I find the required props? The datatype only has on empty prevalue which is optional. And where could I look for this "thing" pointing at a nonexist node? I allready checked cmsDataType and umbracoNode and couldn't find anything suspicous.
Ah, that's what I meant, the prevalue. Hmmm, in that case you might want to start having a look at the source of the Multiple File Upload and check out where this key is coming from and what it's used for.
http://github.com/noerd/Multiple-File-Upload-Package/tree/master/src/ (the download source button is under the search box).
But I don't even know which key is missing... is there a way, to see what key is looked for in the dic?
I don't think it the Umbraco dictionary that is missing something here. The Multiple File Upload is using "System.Collections.Generic.Dictionary" here.
I am not familiar enough with the source, so I have no idea where the key is supposed to come from. So have a look at the filename you got with this exception and have a look at the source to see what it's expecting here.
Don't you just love open source? ;-)
No, of course its not the umbraco dictonary, but "a" dictonary.
But when I look at the error:
It looks like the error is thrown at this point
I'm not quite familar with the internals of umbraco. But it looks like some GUID is missing or something like that?
Ah yes, of course (not fully awake yet).
This datatype is registered using a new GUID during the install of the package. It seems that the GUID is not found in cmsDatatype, the controlId should be: ACCB9911-CD81-4B17-AF3F-446CEB1DBF0D
If it's not there, you might want to run the installed for the Multile File uploader again (make sure to backup before you do so).
Already looked into this, but the cmsDataType with this GUID is present and points to the correct umbracoNode. This can't be the issue I guess. :-( It dbType is Ntext - guess that's ok?
Any other idea?
Are you sure the GUID is the same?
In my database it is an nvarchar, that could be it!
Other than that, uninstalling and reinstalling the package might help..
GUID is identical and already changed dbType to Nvarchar... didn't help. I already uninstalled and installed the package several times. But - maybe this helps - when I install the package using the installer I get the following error:
After the package installation is run, the local installer of MFU asks if I want to do an automatic installation. If I use it it get this:
Der angegebene Schlüssel war nicht im Wörterbuch angegeben.
Beschreibung: Unbehandelte Ausnahme beim Ausführen der aktuellen Webanforderung. Überprüfen Sie die Stapelüberwachung, um weitere Informationen über diesen Fehler anzuzeigen und festzustellen, wo der Fehler im Code verursacht wurde.Ausnahmedetails: System.Collections.Generic.KeyNotFoundException: Der angegebene Schlüssel war nicht im Wörterbuch angegeben.
Quellfehler:
Quelldatei: d:\inetpub\vhosts\fredo03-art.de\httpdocs\usercontrols\MultipleFileUpload\Installer.ascx.cs Zeile: 61
Stapelüberwachung:
Looks like the same error, but I'm 100% sure the GUID is correct inside of cmsDataType...
I'm totaly clueless... :-(
So apparently, the dt.DataType is not null, but when it tries to do the GUID compare you get this error. That is odd, it should just continue..
In cmsDatatype, the data type of the controlId column should be "uniqueidentifier", have you checked that as well?
Maybe one of the other columns in cmsDataType is corrupt? Are any of them missing a controlID or something like that?
Just checked cmsDatatype. Nothing odd on the first glance, no empty controlID, everything looks fine. But I don't know what controll hides behind each GUID. Is there a list of all the GUIDs and the connected GUID? Maybe on is missing and becaus of that .GetAll() won't give me all controlls.
Is there a way to investigate, that further?
Solved it!
This Umbraco installation came a long way from 3.0.x to 4.0.x to 4.1 and it still had an umbracoNode-defintion for the mass-mailer in umbracoNode and cmdDataType. I ersaed both lines from the database and (I just don't know why) everything is working perfeclty!
@Seba: Thanx for your time and support! You pointed me in the right direction!
Greets, Arnim.
Just removing the DataType "MassMailer" from the Datatypes also gets the job done! ;-)
Ahaaa, it's the other way around than what I thought.
But now I'm thinking that maybe your database wasn't corrupt, but the massmailer DLL was removed. Maybe the GetAll method actually tests if the registered GUID is still also loaded in memory somewhere?
It seems to me that you should be able to delete a dll file without wrecking the rest of the packages... Can you confirm that you removed the massmailer from the bin folder? In that case, this might be a bug.
I don't know if this is related but I also have the similar problem with my own user controls in Umbraco backoffice:( I created my own section where I'm trying a simple gridview with update/delete/cancel functionality. On postback if I check the datakeys or selectedDatakey value...they are both empty. I tested my usercontrol in Umbraco public frontend and it works perfect.
Is there something that you have to do different if the user control is used in the backoffice?
Thanks for help!
Update: I just found out that the problem is in the gridview Update function.Edit & Cancel work well...but the Update like if it wasn't there :(
is working on a reply...