#105873Should always store page id in tx_linkvalidator_broken_links not pid
Description
The tx_linkvalidator_broken_links.record_pid always contains the pid of the content record. For pages, this is inconvenient because we need the uid, not the pid. We always need the page id.
It would be better if we generally store the page id instead of the pid.
The current state requires a lot of awkward DB queries where we have to consider pages and non-pages seperately:
For example:
->where(
$queryBuilder->expr()->or(
$queryBuilder->expr()->and(
$queryBuilder->expr()->in(
'record_uid',
$queryBuilder->quoteArrayBasedValueListToIntegerList($pageIdsChunk)
),
$queryBuilder->expr()->eq('table_name', $queryBuilder->quote('pages'))
),
$queryBuilder->expr()->and(
$queryBuilder->expr()->in(
'record_pid',
$queryBuilder->quoteArrayBasedValueListToIntegerList($pageIdsChunk)
),
$queryBuilder->expr()->neq('table_name', $queryBuilder->quote('pages'))
)
)
$constraints = [
$queryBuilder->expr()->or(
$queryBuilder->expr()->and(
$queryBuilder->expr()->in(
'record_uid',
$queryBuilder->quoteArrayBasedValueListToIntegerList($pageIdsChunk)
),
$queryBuilder->expr()->eq('table_name', $queryBuilder->quote('pages'))
),
$queryBuilder->expr()->and(
$queryBuilder->expr()->in(
'record_pid',
$queryBuilder->quoteArrayBasedValueListToIntegerList($pageIdsChunk)
),
$queryBuilder->expr()->neq('table_name', $queryBuilder->quote('pages'))
)
),
etc. ….
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[TASK] Should always store page id in tx_linkvalidator_broken_links not pid Resolves: #105873 Releases: main