Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem:
Throws errors on accessing a method on a non existing object.
Solution:
Check if the term is really a term.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2771329-05-uid-to-username-and-translate-missing-entity-test.patch | 5.56 KB | ekes |
Comments
Comment #2
toschl CreditAttribution: toschl commentedComment #3
ekes CreditAttribution: ekes as a volunteer commentedThere 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.
Comment #4
ekes CreditAttribution: ekes as a volunteer commentedTranslateEntityProcessor is already fixed in #2771329: translate_entity facet processor display non-existent entity ids. Test for that attached, as I'd already written it.
Comment #5
ekes CreditAttribution: ekes as a volunteer commentedThe UidToUserNameCallbackProcessor wasn't changed since the issue. This should correct this one, and add test for that too.
Comment #6
borisson_Comment #7
ekes CreditAttribution: ekes as a volunteer commentedComment #9
borisson_Thank you very much for the patch and the additional tests!