Drupal 11 compatibility - Fatal error: Declaration of Drupal\metatag\Plugin\migrate\source\d7\MetatagFieldInstance::count($refresh = false) must be compatible ...

Created on 20 September 2024, 3 months ago

Problem/Motivation

The Drupal 7 migration source plugin is not compatible with Drupal 11.

Full error:
Fatal error: Declaration of Drupal\metatag\Plugin\migrate\source\d7\MetatagFieldInstance::count($refresh = false) must be compatible with Drupal\migrate\Plugin\migrate\source\SourcePluginBase::count($refresh = false): int

Steps to reproduce

  1. Install Metatag
  2. Enable migrate_drupal (That also enables migrate).
  3. drush migrate:status

Proposed resolution

Patch to add the return type (:int) to the function declaration.

I'll look at doing a patch.

πŸ› Bug report
Status

Active

Version

2.0

Component

Importing/migrating data

Created by

πŸ‡ΊπŸ‡ΈUnited States tetranz

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

Comments & Activities

Production build 0.71.5 2024