U4-9625 - Umbraco 7.2.8 media recycle bin not removing items

Created by Ferdy Hoefakker 14 Mar 2017, 10:41:22 Updated by Sebastiaan Janssen 14 Mar 2017, 11:03:16

I'm trying to clear the recycle bin in the media section with about 500 (give or take) media items in it. The call returns a 200 OK message in Chrome.

The Umbraco log file is showing the following error:

2017-03-14 11:19:08,824 [10] ERROR Umbraco.Core.Persistence.Repositories.RecycleBinRepository2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Umbraco.Core.Models.IMedia, Umbraco.Core, Version=1.0.5675.23466, Culture=neutral, PublicKeyToken=null]] - [P21348/T1/D2] An error occurred while emptying the Recycle Bin: The DELETE statement conflicted with the SAME TABLE REFERENCE constraint "FK_umbracoNode_umbracoNode_id". The conflict occurred in database "[DATABASENAME]", table "dbo.umbracoNode", column 'parentID'. The statement has been terminated. System.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the SAME TABLE REFERENCE constraint "FK_umbracoNode_umbracoNode_id". The conflict occurred in database "[DATABASENAME]", table "dbo.umbracoNode", column 'parentID'. The statement has been terminated. bij System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) bij System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) bij System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) bij System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) bij System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) bij System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) bij System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) bij System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) bij System.Data.SqlClient.SqlCommand.ExecuteNonQuery() bij StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteNonQuery() bij Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass1.<ExecuteNonQueryWithRetry>b__0() bij Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) bij Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteNonQueryWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy) bij Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteNonQueryWithRetry(IDbCommand command, RetryPolicy retryPolicy) bij Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteNonQueryWithRetry(IDbCommand command) bij Umbraco.Core.Persistence.Database.Execute(String sql, Object[] args) bij Umbraco.Core.Persistence.Repositories.RecycleBinRepository`2.EmptyRecycleBin() ClientConnectionId:3077ff00-9d0a-4d30-a28c-bcde48832044 Error Number:547,State:0,Class:16

I also spot this one a bunch of times immediately after the above error:

2017-03-14 11:19:08,908 [10] ERROR Umbraco.Web.PropertyEditors.ImageCropperPropertyEditor - [P21348/T1/D2] An error occurred parsing the value stored in the image cropper value: [MEDIA_ITEM_URL] Newtonsoft.Json.JsonReaderException: Error parsing comment. Expected: *, got m. Path '', line 1, position 1. bij Newtonsoft.Json.JsonTextReader.ParseComment() bij Newtonsoft.Json.JsonTextReader.ParseValue() bij Newtonsoft.Json.JsonTextReader.ReadInternal() bij Newtonsoft.Json.JsonTextReader.Read() bij Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) bij Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) bij Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) bij Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) bij Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) bij Umbraco.Web.PropertyEditors.ImageCropperPropertyEditor.ServiceEmptiedRecycleBin(Dictionary`2 allPropertyData)

What did you do?

  • Right clicked on Recycle Bin in the media section
  • Selected the option Empty recycle bin from the pop-out menu
  • Clicked OK
  • Waited for interface to stop loading and close pop-out menu
  • Right clicked on Recycle Bin again
  • Clicked on Reload nodes
  • All items were still there

What did you expect to happen? I expected the recycle bin to be empty

What actually happened? The recycle bin was not empty

Umbraco version is 7.2.8

Kind regards,

-Ferdy

Comments

Sebastiaan Janssen 14 Mar 2017, 11:03:10

Sorry, this is most likely fixed in a later version. Feel free to re-open this if you're able to reproduce after upgrading the site to 7.5.11.

This might help: https://our.umbraco.org/forum/using-umbraco-and-getting-started/80958-media-recycle-bin-cant-be-emptied


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.2.8

Due in version:

Sprint:

Story Points:

Cycle: