Problem/Motivation

When path module is not enabled and trying to export a node, it throws the following error:

InvalidArgumentException: Field path is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 587 of /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityBase.php).

Steps to reproduce

  • Create a content type
  • Make sure the path module is not enabled
  • Go to the export page of a node

Proposed resolution

Check if path module is enabled when using path.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

brentg created an issue. See original summary.

brentg’s picture

Status: Needs work » Needs review
Issue tags: +drupaldevdays
Wim Leers’s picture

Issue tags: -drupaldevdays +ddd2022
Wim Leers’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

The fact that tests passed means that tests are incomplete; otherwise the bug I fixed in https://git.drupalcode.org/project/single_content_sync/-/merge_requests/... could not have resulted in tests passing…

brentg’s picture

Indeed, the the double $ was a typo

The tests need to be added, but are blocked by https://www.drupal.org/project/single_content_sync/issues/3229471 atm

nginex made their first commit to this issue’s fork.

  • nginex committed 4850140 on 1.2.x authored by brentg
    Issue #3273454: Field path is unknown when path is not installed
    
nginex’s picture

Thank guys for the fix.

nginex’s picture

Assigned: brentg » Unassigned
Status: Needs work » Fixed
nginex’s picture

Version: 1.2.x-dev » 1.3.x-dev
Status: Fixed » Closed (fixed)