Error about incompatible declaration of importContent

Created on 24 March 2021, about 4 years ago
Updated 4 May 2023, almost 2 years ago

Problem/Motivation

I have a site with default_content 2.0.0-alpha1.
I exported content into a module.
When I enable that module and the site starts to import content, I get this error:
Fatal error: Declaration of Drupal\default_content\Importer::importContent($module) must be compatible with Drupal\default_content\ImporterInterface::importContent($module, $update_existing = false) in /app/web/modules/contrib/default_content/src/Importer.php on line 131

Proposed resolution

I think we need to edit
default_content/src/Importer.php
And change:
public function importContent($module) {
into:
public function importContent($module, $update_existing = FALSE) {

🐛 Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

🇧🇪Belgium flyke

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024