-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Copied pages break slug-generation of subpages #86
Comments
This seems to work with the new version 12.3 of TYPO3 CMS (I'm currently working on the upgrade of sluggi). |
slugs are also not updated on other language-versions in connected mode (both page and subpages) in TYPO3 10/11 |
@fgerards Can you recreate this without sluggi (the recursive and redirects stuff is now done by the Core) or is it a problem of the extension? |
@wazum : I thought the "Sync" switch which sluggi introduces forces these recursive updates ? if not, what does the sync-toggle then do internally (tx_sluggi_sync) ? |
@fgerards This stuff keeps the url slug segment in sync with the page title (or any other field you configured). Otherwise, you would have to think about changing the URL when changing the title every time for yourself. |
I have a problem with TYPO3 11.5.25. Subpages of a freshly copied page tree will not be auto-updated anymore, if the parent page changes its slug.
Consider the following page tree:
parent-page
parent-page/subpage-1
parent-page/subpage-2
parent-page/subpage-3
Copy this page tree within the TYPO3 page tree, and insert it somewhere else. The new page tree will look like this:
parent-page-1
(note the appended "-1" to preserve unique slugs)parent-page/subpage-1-1
(note the same, original parent page slug, but also with appended "-1")parent-page/subpage-2-1
parent-page/subpage-3-1
The origin of this problem seems to originate from
EXT:redirects/Classes/Service/SlugService
in theupdateSlug
method:Let's say the page title of the newly copied page is changed to "New Parent Page". On saving the page, the
SlugService
will call theupdateSlug
method for each subpage as well. Let's check thestrpos
-if-branch mentioned before in this case:$subPageRecord['slug']
isparent-page/subpage-1-1
.$oldSlugOfParentPage
isparent-page-1
.parent-page/subpage-1-1
is the haystack,parent-page-1
the needle.strpos('parent-page/subpage-1-1', 'parent-page-1')
will of course returnfalse
, as the string is not found.updateSlug
method aborts, slug of subpage is not updated.See also #35, where the exact same issue seems to have been encountered.
The problem also occurs with a TYPO3 v10.4.34 instance.
This may be a TYPO3 core/redirects problem, not specifically sluggi-related. But fixing this with sluggi would be really helpful.
My current workaround is to forcefully regenerate the slugs of a copied pagetree with https://packagist.org/packages/internetgalerie/ig-slug. Once the slugs of the copied page tree have been cleaned up, the auto-update will work again.
The text was updated successfully, but these errors were encountered: