Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We are working in a patch for inline_entity_form #1526084: Abilty to add existing entities that uses entityreference's automplete behavior.
In node/entity creation form fails because in entityreference_autocomplete_callback there is a bug on $entity_id comprobation.
The patch I append fixes the problem.
Comment | File | Size | Author |
---|---|---|---|
#13 | entityreference-fixing_regression-1625188-13.patch | 965 bytes | stefan.r |
#11 | entityreference-fixing_regression-1625188-11.patch | 869 bytes | liuba |
#4 | entityreference-fixing_regresion-1625188-4.patch | 873 bytes | marcin.wosinek |
#1 | 1706664-2.am_.patch | 916 bytes | jherencia |
#1 | 1706664-2.patch | 500 bytes | jherencia |
Comments
Comment #1
jherencia CreditAttribution: jherencia commentedComment #2
marcin.wosinek CreditAttribution: marcin.wosinek commentedCould you post exact steps to reproduce this error? I've tried using autocomplete within inline_entity_form and it worked without patch.
Comment #3
jherencia CreditAttribution: jherencia commentedSee the code and you'll find that in entityreference_autocomplete_callback $entity_id is set to '', not NULL as the comprobation expects. So even if in your installation of inline_entity_form works, it's a bug that probably will break something else.
Changing to needs review.
Comment #4
marcin.wosinek CreditAttribution: marcin.wosinek commentedI've investigated code, and issue #1625188: Autocomplete widget failed to return any nodes for reference introduced 'NULL' as argument for non entity_id. So it looks like default value fell out of sync. Here's patch.
Comment #5
marcin.wosinek CreditAttribution: marcin.wosinek commented@jherencia could you check #4?
Comment #6
jherencia CreditAttribution: jherencia commentedYes, it works too :).
Comment #7
bojanz CreditAttribution: bojanz commentedNote that Inline Entity Form doesn't need this patch since we went with using our own autocomplete callback after all.
Comment #8
jherencia CreditAttribution: jherencia commentedComment #9
rocketeerbkw CreditAttribution: rocketeerbkw commented#4 makes sense to me and should still be committed to entityreference even if inline_entity_form isn't broken anymore.
Comment #10
jherencia CreditAttribution: jherencia commented@rocketeerkbw
You are right, so RTBC.
Comment #11
liuba CreditAttribution: liuba commentedHere is the patch for the latest recommended version - 7.x-1.0
Comment #13
stefan.r CreditAttribution: stefan.r commentedreroll
Comment #14
stefan.r CreditAttribution: stefan.r commentedComment #15
DamienMcKennaComment #16
minorOffense CreditAttribution: minorOffense at Coldfront Labs Inc. commentedI'm pretty sure this isn't relevant anymore. Plus the patch technically adds the word "NULL" and not the value
NULL