U4-10738 - Deleting a media type folder causes an exception

Created by Claus Jensen 07 Dec 2017, 10:52:54 Updated by Robert Copilau 12 Dec 2017, 15:02:04

Subtask of: U4-9609

Deleting a media type folder causes you to hit this exception: https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Core/Events/EventDefinitionBase.cs#L23

Can be reproduced in a new Cloud project - create a media type folder and try deleting it again.

Not sure if this is a Core error, or if it happens maybe due to Deploy not pushing the correct event back - it seems like the EventName is null when it hits the EventDefinitionBase.

Comments

Claus Jensen 07 Dec 2017, 12:59:54

ContentTypeService does not include the event name when dispatching the DeletedMediaTypeContainer event. This causes Deploy to try to do an event lookup with a null causing it to fail.

PR: https://github.com/umbraco/Umbraco-CMS/pull/2346

Can be tested in a Cloud project (any project that has the Cloud dll's).

  • Create a media type folder and delete it again.
  • You should get an exception.

Fix ensures the exception doesn't happen :)


Claus Jensen 07 Dec 2017, 13:00:42

This could/should be backported?


Robert Copilau 12 Dec 2017, 15:01:49

Tested and media type folder can be deleted, merging.


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty:

Category:

Backwards Compatible: False

Fix Submitted:

Affected versions: 7.7.6

Due in version: 7.7.8

Sprint: Sprint 74

Story Points: 1

Cycle: 6