Problem:
Throws errors on accessing a method on a non existing object.

Solution:
Check if the term is really a term.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

the_tsc created an issue. See original summary.

toschl’s picture

ekes’s picture

There are unchecked entity loads for TranslateEntityProcessor, UidToUserNameCallbackProcessor. There is also an already checked entity load in ListItemProcessor.

So UidToUserName should check. I think in both cases we can just check for NULL? As the load method on the entity class will only return an instance of the class, or NULL.

ekes’s picture

TranslateEntityProcessor is already fixed in #2771329: translate_entity facet processor display non-existent entity ids. Test for that attached, as I'd already written it.

ekes’s picture

Title: Translation of deleted taxonomies throws error » Trying to access deleted entities in processor throws exception
Version: 8.x-1.0-alpha4 » 8.x-1.x-dev
Status: Active » Needs review
FileSize
5.56 KB

The UidToUserNameCallbackProcessor wasn't changed since the issue. This should correct this one, and add test for that too.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community
ekes’s picture

Issue tags: +Dublin2016

  • borisson_ committed cb2811d on 8.x-1.x authored by ekes
    Issue #2796545 by ekes, the_tsc: Trying to access deleted entities in...
borisson_’s picture

Status: Reviewed & tested by the community » Fixed

Thank you very much for the patch and the additional tests!

Status: Fixed » Closed (fixed)

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