Bug #90073
closed
Change sorting of records in list module / draft workspaces breaks workspace module
Added by This Mächler about 5 years ago.
Updated over 2 years ago.
Description
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 1 passed to TYPO3\CMS\Workspaces\Service\GridDataService::getSystemLanguages() must be of the type integer, null given, called in ..../typo3_src-9.5.13/typo3/sysext/workspaces/Classes/Service/GridDataService.php on line 601 | TypeError thrown in file ...../typo3_src-9.5.13/typo3/sysext/workspaces/Classes/Service/GridDataService.php in line 614. Requested URL: https://dev.sgparch.ch/typo3/index.php?route=%%2Fajax%%2Fworkspace%%2Fdispatch&token=--AnonymizedToken--
This breaks the workspace-module functionality (doesn't load properly), up the whole tree, appears when I change the sorting of records in a sys-folder in list module. This sys-folder and all ancestors produce the bug when I open the list module.
The only way to overcome this redactionally is to edit something in a sibling page/folder and do a workspace mass action there. Else you are stuck. Very annoying.
The same thing also happens after moving a record from one sys-folder to another. The error occurs then when selecting the target folder in the workspace-module.
When I create a NEW record in draft workspace, and move it then, the error does not show up.
I should tell my customers "it's safer to not use workspaces at all. But it might work if you are lucky" :-)
This Mächler wrote:
The same thing also happens after moving a record from one sys-folder to another. The error occurs then when selecting the target folder in the workspace-module.
Hi,
moving records on pages also.
I changed the code(type hinting) in typo3/sysext/workspaces/Classes/Service/GridDataService.php : Line 613 to:
/**
* @param int|null $pageId
*
* @return array
*/
public function getSystemLanguages(?int $pageId)
{
if (!isset($this->systemLanguages)) {
$translateTools = GeneralUtility::makeInstance(TranslationConfigurationProvider::class);
$this->systemLanguages = $translateTools->getSystemLanguages($pageId);
}
return $this->systemLanguages;
}
and that seems does the trick
same as Bug https://forge.typo3.org/issues/89692?
I can confirm that this solves the issue.
Nullable type hint does it:
...
611: * @param int|null $pageId
...
614: public function getSystemLanguages(?int $pageId)
- Tags set to workkspace sorting
- Complexity set to no-brainer
TYPO3 9.5.14/9.5.15
I have the same error message as the thread starter and two errors in workspace:
1) When I create an element on a page I don't see that content element in the workspace modul to get approval and publish it. But that's randomly, not every page is effected.
-> I tried the change from Andreas Kiessling and that works and now I see the content elements again in the workspace module.
On another page I had the same problem with another error message: the solution here was to update the reference index: https://forge.typo3.org/issues/91025
2) I created a mask element which has an IRRE field in workspace mode. I publish that element. Now, if I add another IRRE element in workspace mode this new IRRE element is already available in the live mode without any approval ô_O
Maybe that's another issue, not sure.
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
- TYPO3 Version changed from 9 to 10
The same issue is there again in TYPO3 10.4
Please fix
- Related to Bug #91679: Change sorting of records in list module / draft workspaces breaks workspace module added
- TYPO3 Version changed from 10 to 9
- Related to Bug #91025: List of changes in workspace view stays empty in BE added
- Status changed from Closed to New
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF