Problem/Motivation

In #1239558: Deleting an entity with revisions and file/image field does not release file usage of non-default revisions, causing files to linger individual revisions are deleted when a content entity is about to be deleted. In this way the bug from #1239558: Deleting an entity with revisions and file/image field does not release file usage of non-default revisions, causing files to linger has gone away. Now corresponding {file_usage} table entries are cleared.

But the usage entries created until #1239558: Deleting an entity with revisions and file/image field does not release file usage of non-default revisions, causing files to linger are still there.

Proposed resolution

Add an post update path to clear orphan file usage entries.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

claudiu.cristea created an issue. See original summary.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

timmillwood’s picture