wazum/sluggi

Moving page results in unexpected url

datango opened this issue · 0 comments

Using TYPO3 10 V10.4.17

Settings:
basic.slash_replacement: true
basic.synchronize: false
basic.last_segment_only: true

Pages given:
host.de/demo/demo1/demo1a
host.de/demo/demo2/demo2a

Moving as regular user which can only edit last segment.

Moving page demo1a to demo2 results in
host.de/demo/demo2/demo-demo2-demo1a

Expected url:
host.de/demo/demo2/demo1a

Fix of DatamapHook.php works for me:

10a11
> use Wazum\Sluggi\Helper\PermissionHelper;
77c78,84
<             $newSlug = rtrim($parentSlug, '/') . $currentSlugSegment;
---
>           $newSlug = rtrim($parentSlug, '/') . $currentSlugSegment;
>
>           if (PermissionHelper::hasFullPermission()) {
>                 $newSlug = rtrim($parentSlug, '/') . $currentSlugSegment;
>             }else{
>                 $newSlug = $currentSlugSegment;
>             }