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.

Files: 
CommentFileSizeAuthor
#11 entityreference-fixing_regression-1625188-11.patch869 bytesliuba
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch entityreference-fixing_regression-1625188-11.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#4 entityreference-fixing_regresion-1625188-4.patch873 bytesmarcin.wosinek
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]
#1 1706664-2.am_.patch916 bytesjherencia
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]
#1 1706664-2.patch500 bytesjherencia
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]

Comments

StatusFileSize
new500 bytes
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]
new916 bytes
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]

Status:Needs review» Postponed (maintainer needs more info)

Could you post exact steps to reproduce this error? I've tried using autocomplete within inline_entity_form and it worked without patch.

Status:Postponed (maintainer needs more info)» Needs review

See 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.

StatusFileSize
new873 bytes
PASSED: [[SimpleTest]]: [MySQL] 66 pass(es).
[ View ]

I'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.

@jherencia could you check #4?

Status:Needs review» Reviewed & tested by the community

Yes, it works too :).

Note that Inline Entity Form doesn't need this patch since we went with using our own autocomplete callback after all.

Status:Reviewed & tested by the community» Fixed

Status:Fixed» Reviewed & tested by the community

#4 makes sense to me and should still be committed to entityreference even if inline_entity_form isn't broken anymore.

@rocketeerkbw

You are right, so RTBC.

StatusFileSize
new869 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch entityreference-fixing_regression-1625188-11.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Here is the patch for the latest recommended version - 7.x-1.0

Status:Reviewed & tested by the community» Needs work

The last submitted patch, 11: entityreference-fixing_regression-1625188-11.patch, failed testing.