Skip to content

Description field may appear twice in record edit form #627

@github1maxserv

Description

@github1maxserv
  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

If a record already has a field description in TCA yoast may add it also in the SEO tab.
For pages records the field description is already removed from the metatags palette, but other records (e.g. tx_news_domain_model_news) may also contain such a field.
The result is that the field is rendered on two places in the edit form and if you modify the first instance saving the record will not persist the changes.

Please describe what you expected to happen and why.

Expectations are that changes in the description field are persisted in the database when saving the record.

How can we reproduce this behavior?

  1. Call RecordUtility::configureForRecord('tx_news_domain_model_news')->setFieldsPosition('after:bodytext');
  2. Check that for News records the SEO tab and Metadata tab both contain the description field
  3. Because the order of the tabs for News, Internal link and External URL types is different only changes to the "last" occurrence of the description field are saved.

Screenshots

If applicable, add screenshots to help explain your problem.

Logs

If applicable, add logs to help explain your problem.

Additional context

Add any other context about the problem here.

Technical info

  • TYPO3 version: v12
  • Yoast SEO version: 11.1.0 (or later)
  • Relevant extensions in case of a bug: -

Solution

In \YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::addDescriptionField() the description field should be removed from all palettes and types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions