Project

General

Profile

Actions

Bug #105215

open

Richtext-enabled fields work server-side for slug generation, but are not detected as "slug-able" fields in the backend GUI/JS

Added by S P about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling & Redirect Handling
Target version:
-
Start date:
2024-10-07
Due date:
% Done:

0%

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

Description

Situation (this is no ext:news bug! I just use this as an example because we discovered it while using ext:news):

We re-configured the tx_news_domain_model_news.title field of ext:news as an RTE (to allow some very limited HTML tags for very rough styling, like <sub> and <sup>). The Slug generation upon saving a new record still works (the field is respected by the tx_news_domain_model_news.path_segment slug configuration, and tags are stripped, the slug persisted correctly).

However, because the field is now an RTE the "recreate" button ("circular arrows") next to the slug field is disabled. So, an editor can not control the recreation of a slug.

We workaround this by adding a dummy postModifier to the slug field:

public function modify(array $parameters): string
{
    return $parameters['slug'];
}

The JS of the backend GUI has the condition this.hasPostModifiersDefined() which enables the recreate button due to this dummy method.

A "no-op" method should not be needed to alter any behaviour. I suggest that RTEs are considered as "slug-able" by the slug JS/GUI (the DataHandler / slug generation already handles them just fine server-side). The client-side should consistently represent the server-side.

Actions

Also available in: Atom PDF