Bug #90141
closedSlug recreation is not availabe for generator fields that are configured as "readonly"
100%
Description
When the generator field of a slug configuration has the TCA option "readonly" the Slug recreation button is disabled, even though the recreation is possible if started programmatically.
Example:
Have a fairly standard slug field config:
'config' => [
'type' => 'slug',
'generatorOptions' => [
'fields' => ['title'],
'fieldSeparator' => '/',
'prefixParentPageSlug' => true,
'replacements' => [
'/' => '-',
],
],
'fallbackCharacter' => '-',
'eval' => 'uniqueInSite'
]
And the title field, that is readonly (e.g. if the title is provided by an external service):
'title' => [
'label' => 'Title',
'config' => [
'type' => 'input',
'readOnly' => true
],
],
The problem seems to be in the Build/Sources/TypeScript/backend/Resources/Public/TypeScript/FormEngine/Element/SlugElement.ts on Line 211.
The selector only considers [data-formengine-input-name="' + field + '"] as a valid source field, while the readonly input fields don't have those data-Attributes.
In my opinion the disabled-State of the recreate-Button should not be dependent on the state of GUI-Elements. For example if no valid generator fields are configured there still might be postModifiers Hooks that will return a slug eventually.
Basically the same underlying issue as in https://forge.typo3.org/issues/89187 but the patch on that issue will not work for this one.
Updated by David Rellstab over 4 years ago
- Related to Bug #89187: Slug recreation is not available for generator fields with type=inline added
Updated by Gerrit Code Review about 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63947
Updated by Gerrit Code Review about 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63947
Updated by Gerrit Code Review about 4 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63947
Updated by Gerrit Code Review about 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63906
Updated by Andreas Fernandez about 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 71535a112ddd853d920b4d0d5af9ae53f4a4cdbd.