Project

General

Profile

Actions

Bug #98129

open

Workspace pagination is broken

Added by Francois Suter over 1 year ago. Updated 9 months ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2022-08-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
medium
Is Regression:
Yes
Sprint Focus:
On Location Sprint

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'];

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #93915: Workspace "Uncaught (in promise) TypeError: a is null" when in workspace manager moduleClosed2021-04-13

Actions
Related to TYPO3 Core - Bug #93645: Workspace pagination empty and Javascript error: Uncaught (in promise) TypeError: t is undefinedClosed2021-03-04

Actions
Actions #1

Updated by Francois Suter over 1 year ago

  • Related to Bug #93915: Workspace "Uncaught (in promise) TypeError: a is null" when in workspace manager module added
Actions #2

Updated by Francois Suter over 1 year ago

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...

Actions #3

Updated by Francois Suter over 1 year ago

  • Related to Bug #93645: Workspace pagination empty and Javascript error: Uncaught (in promise) TypeError: t is undefined added
Actions #4

Updated by Oliver Hader over 1 year ago

  • resolveDataArrayDependencies: having $this->dataArray = $collectionService->process($this->dataArray); creates numeric keys
  • getDataArray: having $this->dataArray = array_values($this->dataArray); creates numeric keys

getDataArray has the following code as well - which creates numeric keys for a particular case -

To me it seems like $this->dataArray nowadays should be just a list, no other information in the key. This $versionIdentifier was 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;
Actions #5

Updated by Benni Mack 11 months ago

  • Sprint Focus set to Stabilization Sprint
Actions #6

Updated by Benni Mack 9 months ago

  • Sprint Focus changed from Stabilization Sprint to On Location Sprint
Actions

Also available in: Atom PDF