The signature of extractTranslatableData has changed causing fatal error in TMGMT admin

Created on 8 May 2025, 8 days ago

Problem/Motivation

When going to TMGMT admin after enabling TMGMT Ignore Fields has been enabled, we noticed an error :

Got error 'PHP message: PHP Fatal error:  Declaration of Drupal\\tmgmt_ignore_fields\\Plugin\\tmgmt\\Source\\IgnoreFieldsContentEntitySource::extractTranslatableData(Drupal\\Core\\Entity\\ContentEntityInterface $entity): array must be compatible with Drupal\\tmgmt_content\\Plugin\\tmgmt\\Source\\ContentEntitySource::extractTranslatableData(Drupal\\Core\\Entity\\ContentEntityInterface $entity, &$entityRegistry = []) in /opt/www/drupal/web/modules/contrib/tmgmt_ignore_fields/src/Plugin/tmgmt/Source/IgnoreFieldsContentEntitySource.php on line 61'

The weird part is that on our dev server with a similar PHP version we couldn't reproduce it so it might be linked to some custom PHP configuration.

Steps to reproduce

Enable the module, and visit /admin/tmgmt/jobs.

Proposed resolution

Update the signature of extractTranslatableData() to match \Drupal\tmgmt_content\Plugin\tmgmt\Source\ContentEntitySource::extractTranslatableData()

Remaining tasks

MR to be submitted.

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇫🇷France tostinni

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024