Issues exporting with referene

Created on 17 October 2024, 8 months ago

Problem/Motivation

With the latest 2.1.x branch I am trying to export content with references. When I run the export via the UI I get this error:

TypeError: Drupal\default_content_deploy\Exporter::getSkipExportTimestamp(): Return value must be of type bool, null returned in Drupal\default_content_deploy\Exporter->getSkipExportTimestamp() (line 424 of modules/contrib/default_content_deploy/src/Exporter.php).

If I modify getSkipExportTimestamp() like this it works:
return (bool) $this->skipExportTimestamp;

Then I run into another error:

Error: Call to a member function getEntityTypeId() on bool in Drupal\default_content_deploy\Exporter->getEntityReferencesRecursive() (line 1161 of modules/contrib/default_content_deploy/src/Exporter.php)

This is caused by a processed text dependency that is broken. When this happens, the entity query $entity_loaded_by_uuid returns an empty array, then reset() turns it into FALSE. If I check that the result is an instanceof EntityInterface before returning then the issue is fixed, and I can export all of my content.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇨🇦Canada smulvih2 Canada 🍁

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

Comments & Activities

Production build 0.71.5 2024