wazum / sluggi

The TYPO3 CMS slug helper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Editing page outside of sites with default page option Synchronize URL Segment creates error

jpmschuler opened this issue · comments

Exception 1521716622 no site found in rootline of page is thrown if I edit the title of a page outside a site config, as long as Synchronize URL Segment is active.

It seems this option tries to update the slug (obviously) but tries to find the root page to get the prefix or something, but sometimes root pages won't exist.

Our page structure is like

\ Customer A
| \ Sitepackage A-A
|   |\ Subcustomer A-A-A
|   |    |\ Site 1
|   |    |
|   |    |\ Site 2
|   |\ Subcustomer A-A-B
....
| \ Sitepackage A-B

So the first 3 levels are used for structuring the 60+ sites and 4 templates in the system, so the actual sites/domains are on level >= 3 and I was renaming a Subcustomer.

@jpmschuler thanks for the report, what would you expect for these pages? No sluggi action at all? Help me to find the correct use case.

From a pragmatic perspective: If no parent SITE, then skip processing.
The reason here: If I disable EXT:sluggi, that field exists and can be changed for that case.

I don't know an answer from a conceptional perspective: as the slug probably won't be used to create an URI for that page it shouldn't be available at all. However it could be that a non-site page is mounted somewhere, so it could be used nevertheless, however nobody would expect an autoslug to work there.

So in the end: This is an edge case. Doing nothing and gracefully catching the exception, perhaps issuing a FlashMessage to be transparent would be the way to go.