[WIP][FEATURE] Add dbdoctor rule for orphaned translation records#171
Open
ErHaWeb wants to merge 1 commit intololli42:mainfrom
Open
[WIP][FEATURE] Add dbdoctor rule for orphaned translation records#171ErHaWeb wants to merge 1 commit intololli42:mainfrom
ErHaWeb wants to merge 1 commit intololli42:mainfrom
Conversation
c3fb276 to
0101c5a
Compare
Add health checks to clean up translated records that are orphaned due to missing language support in the target context: * Remove translated records whose sys_language_uid is not configured in the resolved site configuration. * Remove translated records (except pages) whose pid has no corresponding page translation for the record language. The checks follow DataHandler::copyL10nOverlayRecords() semantics, work correctly in multisite setups, skip non-site contexts and provide safe fix suggestions (soft-delete where supported). Resolves: lolli42#87, lolli42#119
0101c5a to
bdc0dea
Compare
Owner
|
This reads plausible at first glance. Needs a good review keeping details in mind, though. |
lolli42
reviewed
Mar 4, 2026
| ->orderBy('uid'); | ||
|
|
||
| if ($isTableWorkspaceAware) { | ||
| // Skip DELETE_PLACEHOLDER records (t3ver_state = 2), those are workspace internals. |
Owner
There was a problem hiding this comment.
not yet fully convinced here: delete_placeholders are overlays for live records to say "this live record does not exist in this workspace anymore". their sys_language_uid value may be irrelevant so it may be ok to skip them here. BUT: if we delete a live record here that has a delete_placeholder in some workspace, this delete_placeholder would be orphaned. As such, I guess we should probably establish another check looking for such cases, probably rather late in the chain. Can be done with a separate issue and patch, though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add health checks to clean up translated records that are orphaned due to
missing language support in the target context:
resolved site configuration.
page translation for the record language.
The checks follow DataHandler::copyL10nOverlayRecords() semantics, work
correctly in multisite setups, skip non-site contexts and provide safe
fix suggestions (soft-delete where supported).
Resolves: #87, #119