You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using SimplifiedOverviewAndPublishing, opening the Content Publisher overview module returns a 503 error for specific pages with the following error message:
Call to a member function addRelatedRecord() on null
My guess is, sometimes the translations will be delivered by the database before the origin records, since they all have the same sorting value (used by SingleDatabaseRepository::findByProperty). For example in our pages table, when looking for records under a specific pid and using the sorting column to order results, the translation with uid 61483 will come after its parent record 75:
But the loop expects the origin for translations (used as $pid) to be already in the $pageRecords array. A possible workaround would be to add the languageField as an additional (asc) order field in SingleDatabaseRepository::findByProperty:
if (!empty($GLOBALS['TCA'][$table]['ctrl']['sortby'])) {
$query->orderBy($GLOBALS['TCA'][$table]['ctrl']['sortby']);
} elseif (!empty($GLOBALS['TCA'][$table]['ctrl']['default_sortby'])) {
$orderByClauses = QueryHelper::parseOrderBy($GLOBALS['TCA'][$table]['ctrl']['default_sortby']);
foreach ($orderByClauses as $orderByClause) {
if (!empty($orderByClause[0])) {
$query->addOrderBy($orderByClause[0], $orderByClause[1]);
}
}
} else {
$query->orderBy('uid');
}
+ if (!empty($GLOBALS['TCA'][$table]['ctrl']['languageField'])) {+ $query->addOrderBy($GLOBALS['TCA'][$table]['ctrl']['languageField']);+ }+
$result = $query->execute();
That being said, I am a little unsure, since I assume this issue would affect most of the multilingual websites, and I am wondering why it didn't surface until now. Maybe it's an edge case that only happens in our setup?
The text was updated successfully, but these errors were encountered:
Versions: TYPO3
11.5.31
, in2publish11.2.1
, in2publish_core11.0.7
When using
SimplifiedOverviewAndPublishing
, opening the Content Publisher overview module returns a 503 error for specific pages with the following error message:It seems to happens in the ShallowRecordFinder in the
addChildPagesRecursively
method, on line 287 ($pageRecords[$pid]->addRelatedRecord($record);
)My guess is, sometimes the translations will be delivered by the database before the origin records, since they all have the same
sorting
value (used bySingleDatabaseRepository::findByProperty
). For example in our pages table, when looking for records under a specificpid
and using thesorting
column to order results, the translation with uid61483
will come after its parent record75
:But the loop expects the origin for translations (used as
$pid
) to be already in the$pageRecords
array. A possible workaround would be to add thelanguageField
as an additional (asc) order field inSingleDatabaseRepository::findByProperty
:That being said, I am a little unsure, since I assume this issue would affect most of the multilingual websites, and I am wondering why it didn't surface until now. Maybe it's an edge case that only happens in our setup?
The text was updated successfully, but these errors were encountered: