Problem/Motivation

> Error: Call to a member function getTranslation() on null in Drupal\entity_share_client\Plugin\views\field\EntityLabel->render() (line 81 of modules/contrib/entity_share/modules/entity_share_client/src/Plugin/views/field/EntityLabel.php).

and corresponding warnings:

> Warning: Undefined array key 7293 in Drupal\entity_share_client\Plugin\views\field\EntityLabel->render() (line 78 of modules/contrib/entity_share/modules/entity_share_client/src/Plugin/views/field/EntityLabel.php).

which is this line:

    $imported_entity = $this->loadedEntities[$entity_type_id][$value];

Which I don't understand, as we load all the entities in preRender()!

I don't get this locally either, so can't debug!

Entity 7293 is a node, so it's not even like it's something wacky.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

joachim created an issue. See original summary.

joachim’s picture

Oh wait!

I get it. It's because we've just done a DB import, but not dropped the {entity_import_status} table first!

So it has a log for a node that doesn't exist yet, or even at all!

joachim’s picture

Priority: Critical » Major

Downgrading.

Would be a nice fix to have anyway.

The other views handlers need checking for this sort of things too.

joachim’s picture

Status: Active » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

  • joachim committed 65b74af6 on 4.0.x
    [#3546179] fix: fix crash in import status view if the entity for an...

  • joachim committed bab84cce on 8.x-3.x
    [#3546179] fix: fix crash in import status view if the entity for an...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.