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 Umbraco version are you using? (Please write the exact version, example: 10.1.0)
13.0.3
Bug summary
I created a NotificationHandler to process information of a CSV file but that file has thousands of records, then I thought of using a background task so that the notification does not wait until all the records have been processed.
If we don't use the background task we don't have the error, but we cannot upload files because Media Section keeps waiting and when we try to upload the files, the save button stays with the loading indicator.
We have this error in the notification:
Authorization error: Unauthorized access to URL: /umbraco/backoffice/umbracoapi/media/PostSave Contact your administrator for information.
Here is the code that we have:
public class MediaSavedNotificationHandler(IBackgroundTaskQueue queue, IServiceProvider serviceProvider)
: INotificationAsyncHandler<MediaSavedNotification>
{
public async Task HandleAsync(MediaSavedNotification notification, CancellationToken cancellationToken)
{
var mediaItems = notification.SavedEntities;
foreach (var mediaItem in mediaItems)
{
if (mediaItem.Key == MediaNodeIdIdentifiers.MaintenanceProvidersFileNodeId)
{
queue.QueueBackgroundWorkItem(async cancellationToken =>
{
using IServiceScope scope = serviceProvider.CreateScope();
var maintenanceProviderService = scope.ServiceProvider.GetRequiredService<IMaintenanceProviderService>();
await maintenanceProviderService.ImportProviders(mediaItem.Id);
});
notification.Messages.Add(new EventMessage("Maintenance Provider Notification",
"The Maintenance Providers import process has started and is running in the background.",
EventMessageType.Info));
return;
}
}
}
}
Here is the error that we have:
The records are in the custom table:
Note: Everything is still working and running in the background.
Specifics
No response
Steps to reproduce
Expected result / actual result
No response
The text was updated successfully, but these errors were encountered:
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
We'll replicate the issue to ensure that the problem is as described.
We'll decide whether the behavior is an issue or if the behavior is intended.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
13.0.3
Bug summary
I created a NotificationHandler to process information of a CSV file but that file has thousands of records, then I thought of using a background task so that the notification does not wait until all the records have been processed.
If we don't use the background task we don't have the error, but we cannot upload files because Media Section keeps waiting and when we try to upload the files, the save button stays with the loading indicator.
We have this error in the notification:
Authorization error: Unauthorized access to URL: /umbraco/backoffice/umbracoapi/media/PostSave Contact your administrator for information.
Here is the code that we have:
Here is the error that we have:
The records are in the custom table:
![image](https://private-user-images.githubusercontent.com/24300082/294610038-d117710c-a4b7-4939-880a-9641492d6a7c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1Nzk5MDcsIm5iZiI6MTczOTU3OTYwNywicGF0aCI6Ii8yNDMwMDA4Mi8yOTQ2MTAwMzgtZDExNzcxMGMtYTRiNy00OTM5LTg4MGEtOTY0MTQ5MmQ2YTdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAwMzMyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE0ZTAwZWJiMjc5MTY0ZjJhNDY2NTBlZDQ4ZmYxMDEyYjMxODdlZjY4MmYwZjgzZGRhMWNjM2U4NTRmYTcyZTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IVrK5x6TQpY8PlGRlpraRJfzjycSiOSDRBBdokROqqg)
Note: Everything is still working and running in the background.
Specifics
No response
Steps to reproduce
Expected result / actual result
No response
The text was updated successfully, but these errors were encountered: