Moving pages in workspace draft mode no more possible due to an exception error
claude27 opened this issue · comments
It's no more possible to move pages in the page tree in workspace draft mode.
This is caused by an exception error:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 1 passed to Wazum\Sluggi\Backend\Hook\DatamapHook::getLastSlugSegment() must be of the type string, null given, called in /xxx/public/typo3conf/ext/sluggi/Classes/Backend/Hook/DatamapHook.php on line 251 | TypeError thrown in file /xxx/public/typo3conf/ext/sluggi/Classes/Backend/Hook/DatamapHook.php in line 652.
How can this prevented?
@claude27 unfortunately I'm not using workspaces in any of my projects, so it's a bit hard for me to test with this stuff.
It looks like the requested page has no slug value
$currentPage = BackendUtility::getRecord('pages', $id, 'uid, slug, sys_language_uid');
…
$currentSlugSegment = $this->getLastSlugSegment($currentPage['slug']);
Would be very helpful if you step through this part with a debugger and report what's going on.
@claude27 please check out the new version for TYPO3 CMS 10 (2.0), if you can see the same problem there
I confirm that I have tested @gianstra 's patch and it works in draft!
After this bug is fixed https://review.typo3.org/c/Packages/TYPO3.CMS/+/68182 in TYPO3 10.4.14 and sluggi patch #56 the behaviors are more and more similar with "vintage" RealURL :)
Thanks to @wazum and @gianstraf !!!
Version 3+ (for TYPO3 11) should now be compatible with Workspaces