You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8
8.16+
Bug summary
If you have a MediaSaving event / notification handler, and want to add an event message, it is always interpreted as an error when uploading new media items regardless of if you set EventMessageType to Success, or any other non-error option.
This is an issue when uploading new media, as you then have to reload in order to view what you have just uploaded.
The issue appears to stem from umbfiledropzone.directive.js whereby when a file is uploaded this is checked
.success(function(data, status, headers, config) {
if (data.notifications && data.notifications.length > 0) {
// set error status on file
file.uploadStatus = "error";
// Throw message back to user with the cause of the error
file.serverErrorMessage = data.notifications[0].message;
// Put the file in the rejected pool
scope.rejected.push(file);
The status should only be set to error if the EventMessageType is Error.
It also appears that you cannot have multiple messages here either, as the first item in the array is always chosen for the display message
Specifics
No response
Steps to reproduce
Create a MediaSaving event / notification handler, and add a message - Umbraco 9 example:
public class IssueExampleComponent : INotificationHandler<MediaSavingNotification>
{
public void Handle(MediaSavingNotification notification)
{
foreach (var entity in notification.SavedEntities)
{
notification.Messages.Add(new EventMessage("Event message",
"An event message to show",
EventMessageType.Info));
}
}
}
Upload a new media item, and the media will appear to have errored, and will show a red error message. You will then have to refresh to see the media you've just uploaded.
Note: This is for new media items, as saving an existing media item will show a notification as expected.
Expected result / actual result
Expected result - A notification added during a media saving event / notification, should not be treated as an error unless EventMessageType.Error is used.
Actual result - All notifications are treated as errors, even if EventMessageType.Success is used.
The text was updated successfully, but these errors were encountered:
Whilst writing a fix for this for Umbraco 9, I found that the PostAddFile endpoint isn't correctly returning response data.
Issue: #11278
Which I have opened a PR to fix #11279
Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more.
We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed).
To open it this issue up again, you can write @umbrabot still relevant in a new comment as the first line. It would be super helpful for us if on the next line you could let us know why you think it's still relevant.
For example:
@umbrabot still relevant
This bug can still be reproduced in version x.y.z
Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8
8.16+
Bug summary
If you have a MediaSaving event / notification handler, and want to add an event message, it is always interpreted as an error when uploading new media items regardless of if you set
EventMessageType
toSuccess
, or any other non-error option.This is an issue when uploading new media, as you then have to reload in order to view what you have just uploaded.
The issue appears to stem from
umbfiledropzone.directive.js
whereby when a file is uploaded this is checkedThe status should only be set to error if the
EventMessageType
isError
.It also appears that you cannot have multiple messages here either, as the first item in the array is always chosen for the display message
Specifics
No response
Steps to reproduce
Create a MediaSaving event / notification handler, and add a message - Umbraco 9 example:
Upload a new media item, and the media will appear to have errored, and will show a red error message. You will then have to refresh to see the media you've just uploaded.
Note: This is for new media items, as saving an existing media item will show a notification as expected.
Expected result / actual result
Expected result - A notification added during a media saving event / notification, should not be treated as an error unless
EventMessageType.Error
is used.Actual result - All notifications are treated as errors, even if
EventMessageType.Success
is used.The text was updated successfully, but these errors were encountered: