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
When trying to delete form records in a background job (Hangfire in my case), IRecordService.Delete() throws a null reference exception.
Reproduction
Bug summary
See stacktrace below. RecordService.GetUsernameOfCurrentUser() doesn't mind if backOfficeSecurity.CurrentUser is null, but if backOfficeSecurity itself is null, presumably because there is no HttpContext available for the backoffice security accessor, an exception is thrown and the record is not deleted.
Specifics
Forms version
Tested in 9.4.1 and 9.3
Stacktrace at Umbraco.Forms.Core.Services.RecordService.GetUsernameOfCurrentUser() at Umbraco.Forms.Core.Services.RecordService.Delete(Record record, Form form)
Steps to reproduce
Call IRecordService.Delete() from a Hangfire task
Possible fix
Perform the null check on backOfficeSecurity as well:
The text was updated successfully, but these errors were encountered:
When trying to delete form records in a background job (Hangfire in my case), IRecordService.Delete() throws a null reference exception.
Reproduction
Bug summary
See stacktrace below. RecordService.GetUsernameOfCurrentUser() doesn't mind if backOfficeSecurity.CurrentUser is null, but if backOfficeSecurity itself is null, presumably because there is no HttpContext available for the backoffice security accessor, an exception is thrown and the record is not deleted.
Specifics
Forms version
Tested in 9.4.1 and 9.3
Stacktrace
at Umbraco.Forms.Core.Services.RecordService.GetUsernameOfCurrentUser() at Umbraco.Forms.Core.Services.RecordService.Delete(Record record, Form form)
Steps to reproduce
Call IRecordService.Delete() from a Hangfire task
Possible fix
Perform the null check on backOfficeSecurity as well:
The text was updated successfully, but these errors were encountered: