Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jpmschuler opened this issue Feb 3, 2023 · 3 comments

Comments

@jpmschuler
Copy link

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.

@wazum
Copy link
Owner

wazum commented Feb 6, 2023

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

@jpmschuler
Copy link
Author

jpmschuler commented Feb 7, 2023

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.

@lechenbauer
Copy link

I get this error when I update the page title for SysFolders outside a site.
It seems to me that the processDatamap_postProcessFieldArray function of the HandlePageUpdate class is missing the $this->shouldRun check, which is used in the processDatamap_preProcessFieldArray.
Therefore, the exclude_page_types configuration in the postProcessFieldArray function is not taken into account...
As a workaround, I have deactivated the sync by default for these folders:
TCAdefaults.pages.tx_sluggi_sync = 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants