When I fetch the tag cloud, I get a bunch of tags and the TagCloudItems indicate that there are a number of items in each tag.In my tags page which is supposed to list the tagged items for a certain tag, I get no results at all.
This is the code I use
tags.TagCloud = TagHandler.Instance.GetTagCloud(20);
string something = "Episerver";
Tag tag = new Tag(something); //<- A watch on tag shows that tag has 4 items after this row
var items = TagHandler.Instance.GetTaggedItems(tag, null, null, null, EntityStatus.Approved, page, pageSize, out totalItems);
//totalItems is 0 here, and number of items is 0.
Suddenly in debug mode it works. Caching?
Could be caching. Because I struggled with Relate attributes also - adding attribute from the code and then immediately retrieving that value. Cache was the issue of the exception. Havn't dig into your case..