Call to a member function getString() on null in Drupal\business_rules\Plugin\EntityReferenceSelection\BusinessRulesViewsSelection->getParentFieldValue() (line 511)
After further investigation I came to a conclusion that after applying a patch for #1699378: Allow tokens in entity reference views selection arguments the behavior of line 511 changed. I am still investigating like what exactly happened But on the other side if a condition is applied to the code line 511 it serves the purpose and works like a charm with the above core patch.
Please find attached a patch file to fix this bug caused by core patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | business_rules-core_token_patch_fix-3051064-6.patch | 1.24 KB | colan |
| #3 | post-core-patch-fix-3051064-3.patch | 868 bytes | qandeel |
Comments
Comment #2
qandeel commentedComment #3
qandeel commentedComment #4
qandeel commentedComment #5
kdomenick commentedPatch in #3 worked for me!
THANK YOU for this post! I have been struggling with this same issue (unable to edit fields), but I couldn't identify when it began and what was causing it. I knew that I was able to edit these fields at one time, so it didn't feel like a bug with Business Rules.
My /core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php has been patched/customized also.
Comment #6
colanThis bug still exists in HEAD.
We can fix this in one line; there's no need for the additional ones.
Comment #8
colanThanks for finding and working on this one.