#98129Workspace pagination is broken
Description
The pagination of the Workspaces module does not work. Visually it always displays the first 30 elements. When looking at the response of the AJAX request, it appears that all elements are returned every time, no matter what value is passed in the start parameter.
The culprit is \TYPO3\CMS\Workspaces\Service\GridDataService::calculateStartWithCollections() which always returns “0”. This is due to line 699, a regression introduced by https://github.com/TYPO3/typo3/commit/7258b52477a3c9119a24af20c1513c111dac768f (how could it be merged?). The problem is that the test on line 699:
if (!isset($this->dataArray[$recordsCount])) {
will always fail because the keys of array $this->dataArray are not numerical. They are strings assembled in \TYPO3\CMS\Workspaces\Service\GridDataService::generateDataArray(), on line 194:
$versionArray['id'] = $table . ':' . $record['uid'];Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 3
History 9
-
Francois Suter changed Related to #93915 <span data-processor="relativetime" data-value="2022-08-12T08:30:21+00:00" > 08/12/22, 08:30 </span>
-
Francois Suter commented <span data-processor="relativetime" data-value="2022-08-12T08:32:53+00:00" > 08/12/22, 08:32 </span>
-
Francois Suter changed Related to #93645 <span data-processor="relativetime" data-value="2022-08-12T08:33:11+00:00" > 08/12/22, 08:33 </span>
-
Oliver Hader commented <span data-processor="relativetime" data-value="2022-08-12T17:22:53+00:00" > 08/12/22, 17:22 </span>
resolveDataArrayDependencies: having$this->dataArray = $collectionService->process($this->dataArray);creates numeric keysgetDataArray: having$this->dataArray = array_values($this->dataArray);creates numeric keys
getDataArrayhas the following code as well – which creates numeric keys for a particular case -To me it seems like
$this->dataArraynowadays should be just a list, no other information in the key. This$versionIdentifierwas used in the past to avoid duplicates (overlays, new or move place-holders).Thus, I think it now just should be like this in
generateDataArray():$this->dataArray[] = $versionArray;
-
Benni Mack changed Sprint Focus Stabilization Sprint <span data-processor="relativetime" data-value="2023-06-06T12:59:14+00:00" > 06/06/23, 12:59 </span>
-
Benni Mack changed Sprint Focus
Stabilization SprintOn Location Sprint <span data-processor="relativetime" data-value="2023-08-02T14:48:06+00:00" > 08/02/23, 14:48 </span> -
Riccardo De Contardi commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2024-08-22T08:24:00+00:00" > 08/22/24, 08:24 </span>Is this reproducible on version 12 or higher? I tried a short test on version 12, modifying 30+ records (pages and CE) until I got 2 pages on the Workspace module.
And the pagination on the bottom seems to work (tried clicking on both numbers and arrows)Is a different test necessary?
-
Riccardo De Contardi changed Related to #106308 <span data-processor="relativetime" data-value="2025-03-05T09:47:44+00:00" > 03/05/25, 09:47 </span>
-
Benni Mack commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2025-03-23T21:55:25+00:00" > 03/23/25, 21:55 </span>Closing this issue due to lack of feedback after 90 days. If you feel this is the wrong decision, let me know, so I will re-open the issue.
The commit that introduced method
\TYPO3\CMS\Workspaces\Service\GridDataService::calculateStartWithCollections()is:https://github.com/TYPO3/typo3/commit/f8e4b4430b745961a0d84038ef03dca79186d24e
and it’s weird, because – looking at the code – I can’t see how it ever worked…