U4-9521 - Media root shows content of media recycle bin

Created by Mads Rasmussen 13 Feb 2017, 13:26:43 Updated by Claus Jensen 08 Mar 2017, 12:13:32

Subtask of: UAASSCRUM-810

When I delete a media item from the media library it gets moved to the recycle bin but the media item stil shows up in the root.

2 Attachments

Comments

Shannon Deminick 21 Feb 2017, 04:43:01

@madsrasmussen can you explain this a little better?

I've definitely discovered an issue with the EntityController and the GetPagedDescendants call returning items in the recycle bin which I've fixed, but I'm unsure as to what you are talking about here. Deleting media items will not show up in the main media tree, only in the recycle bin or are you referring to something else?


Mads Rasmussen 21 Feb 2017, 09:02:25

They are moved correctly in the tree but the dashboard shows the images. I did some more testing on this and found a bug which might be related. I have tested this in the dev-7.6 branch so it might have been fixed somewhere else.

Images from folders show up in media root How to reproduce.

  1. Open media section
  2. Add a folder to the root
  3. Add images to the new folder
  4. Go back to media root 5 Images from the folder will show up in the root

I have added two images to show the two scenarios:

  • Images from the recycle bin are shown in the media root
  • Images from a folder are shown in the media root


Shannon Deminick 22 Feb 2017, 02:24:43

Hrm, this may be fixed with http://issues.umbraco.org/issue/U4-9293


Emil Wangaa 03 Mar 2017, 12:53:36

So the MediaService.GetPagedChildren didn't filter on ParentId if it was the root node so all media items would be shown - also if they were trashed. I have submitted a PR to fix this https://github.com/umbraco/Umbraco-CMS/pull/1779


Claus Jensen 03 Mar 2017, 13:08:38

https://github.com/umbraco/Umbraco-CMS/blob/dev-v7.6/src/Umbraco.Core/Services/ContentService.cs#L582-L585


Emil Wangaa 03 Mar 2017, 13:58:31

Applied to the ContentService as well in same PR


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.6.0

Due in version:

Sprint: Sprint 54

Story Points: 1

Cycle: