U4-2094 - using Descendants() with Umbraco.Media returns items twice

Created by Tim 10 Apr 2013, 07:03:29 Updated by Shannon Deminick 08 May 2013, 04:57:02

perhaps related to this issue http://issues.umbraco.org/issue/U4-1653

but whenever I use Descendents() in 6.01 - 6.1 The expected nodes are returned, but twice.

also created a post on our.umbraco about this. Maybe my code is just duff. http://our.umbraco.org/forum/developers/razor/39999-Media-Descendants-appearing-twice?p=0#comment146182

Comments

Sebastiaan Janssen 07 May 2013, 13:24:50

Seems to have something to do with EnumerableExtensions.FlattenList the input it x items, the output x*2 items (when I only have children, create another folder with subitems and the folder only shows one time).


Shannon Deminick 08 May 2013, 04:14:33

I was about to say I couldn't replicate this... but then I tried it on a non-root node and got the issue. Will have a look.


Shannon Deminick 08 May 2013, 04:56:37

Was to do with an error in the logic in the DefaultPublishedMediaStore missing a MoveNext() call when defaulting to use library.GetMedia instead of Examine. Have fixed this up and now if Examine is active and doesn't find the child, we don't continue to try library.GetMedia as that will be horrible for performance. So all fixed up and better performance too :) Rev: 99863c93ef4d


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category: Architecture

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.0.0, 6.1.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4

Due in version: 6.1.0, 6.0.6

Sprint:

Story Points:

Cycle: