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

[FEATURE] Trigger SlugHelper when a new record was translated #323

Open
weisgerberm opened this issue Apr 16, 2024 · 3 comments
Open

[FEATURE] Trigger SlugHelper when a new record was translated #323

weisgerberm opened this issue Apr 16, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@weisgerberm
Copy link

Is your feature request related to a problem? Please describe.
It would be helpful if the SlugHelper recalculated the slug of the new record.

Describe the solution you'd like
You could possibly check the TCA to see whether there is a field of type "slug" and only trigger this process if this is the case.
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/DataHandling/SlugHelper.php

Thank you

@weisgerberm weisgerberm added the enhancement New feature or request label Apr 16, 2024
@calien666
Copy link
Member

Hi @weisgerberm,
What is the current behaviour? As we work with the DataHandler, this should be default behaviour. Do you have special structure, where this is not happening?
Please provide a scenario, where the slug isn't calculated correct, so we can take a look.

@weisgerberm
Copy link
Author

Hi @calien666

Sorry for the late response. Somehow I must have overlooked the notification from github.
I don't actually have a specific structure.
Current scenario: Let's just assume the news extension. I have a data record in the standard language and then click on the button to translate DeepL in the list view. The data record is translated correctly, but the slug is still the one from the standard language

TCA:
2024-05-20 21_45_09-Configuration · $GLOBALS 'TCA'  (Array für Tabellenkonfiguration) · darf-ich-mit

It automatically updates the slug correctly when I translate a page. Does this also work for you with custom records?

@pixelbrackets
Copy link
Contributor

Confirmed, slugs for pages are updated automatically, slugs for all other TCA records not (eg. »news«). The datahandler somehow does not update this field for TCA records.

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

No branches or pull requests

3 participants