U4-3077 - No id "xxxx" exists in dictionary

Created by Fabrice Loudet 09 Oct 2013, 13:34:58 Updated by Shannon Deminick 27 Oct 2013, 23:16:52

Hello, We are using Umbraco 6.1.5 and SQL server 2008.

When the editors are saving a bit too much the dictionary items, we have an exception "No id "xxxx" exists in dictionary" and from there all access to the dictionary item generate an exception. We have to recycle the app pool. And if that happen when we are not available, the live site is down.

According to http://our.umbraco.org/forum/using/ui-questions/7101-No-key-xxxx-exists-in-dictionary Richard confirms : "Dictionary items are cached internally. I think this error has to do with caching I would restart the site and see what happens."

I looked at the source code, and in Dictionary.cs we have :

public DictionaryItem(int id) { EnsureCache();

            var item = DictionaryItems.Values.SingleOrDefault(x => x.id == id);

            if (item == null)
                throw new ArgumentException("No id " + id + " exists in dictionary");


My "guess" is that somehow, some process is calling EnsureCache, and just before executing the line "_cacheIsEnsured = true;" an other thread is doing ClearCache() { DictionaryItems.Clear(); _cacheIsEnsured = false;}

and we have a situation where the DictionaryItems are cleared but cacheIsEnsured =true....

Could you please have a look at it to see if there could be a fix for this situation ?

Best Regards Fabrice


Shannon Deminick 10 Oct 2013, 04:47:34

Fixed in rev 6c77749e32d9a8a6f0296953cca33acda24b68cf Will post the nightly url link shortly.

Emil Rasmussen 25 Oct 2013, 11:33:17

Shouldn't this issue have a "Due in version" tag? I'm trying to see which version this will be "officially" fixed in.

Priority: Normal

Type: Exception

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category: Architecture

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.5

Due in version: 7.0.0, 6.2.0


Story Points: