Review 10.4 Merged

65628[BUGFIX] Update ref-index when deleting new workspace relations

Christian Kuhn CR +2 V +2 Hard +131 −171 updated 09/07/20, 21:01

Commit message

Adding an image to a workspace content element adds two
sys_refindex entries: One for the sys_file_reference
t3ver_state=-1 and one for the t3ver_state=1 record.

Deleting the image reference again in workspaces only sets
one of the two to deleted in sys_refindex, leading to orphan
sys_refindex entries.

The patch fixes this by adding a 'redo refindex' call at the
appropriate place.

There are more issues when 'discard changes' is used together with
multi-level relations (tt_content->hotel->offer->price): Discard
does not properly cascade in those cases, yet. The patch touches
this as a side-effect and does not improve the situation. The .csv
files are marked with @todo accordingly and will be fixed with further
patches. Those scenarios are more seldom than a broken sys_refindex
for FAL images which is the primary goal of this patch.

Analyzing the test scenarios, the patch actually removes various
rows from sys_refindex where the left part of the relation is set
to deleted. This is correct and wanted: In the end we don't want
sys_refindex to contain reference to deleted rows at all. This
strategy will be further followed with other patches.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 41

Show 21 more files