Project

General

Profile

Actions

Bug #90141

closed

Slug recreation is not availabe for generator fields that are configured as "readonly"

Added by David Rellstab over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2020-01-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #89187: Slug recreation is not available for generator fields with type=inlineClosed2019-09-17

Actions
Actions #1

Updated by David Rellstab over 4 years ago

  • Related to Bug #89187: Slug recreation is not available for generator fields with type=inline added
Actions #2

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

Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

Updated by Andreas Fernandez about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF