Hi,

I am facing a problem when I am trying to select term reference autocomplete in node.
A term contain comma "," and when I am trying to submit the node getting below error message :

"Failed to create or find a target called "ABC, XYZ (1007)" (entityreference_autocreate). This may be due to permissions, or possibly if there are two targets with identical titles already on the system."

Any idea?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sanjay.soni created an issue. See original summary.

sanjay.soni’s picture

Created a patch in which removed the condition for search comma in term/node reference title.

Please see attached patch.

sanjay.soni’s picture

Hi,

I found that there is already created a issue which is looking similar. Marking a relationship.

Thanks,
Sanjay

  • dman committed 3e6632d on 7.x-1.x
    Issue #2873208,#2225049,#2774249 - Update Tests : Added test case for...
Sardis’s picture

Status: Active » Needs review

Triggering Testing bot to conduct tests.

  • dman committed dfb0669 on 7.x-1.x authored by sanjay.soni
    Issue #2774249 by sanjay.soni: Term Refernce autocomplete is not working...
dman’s picture

Status: Needs review » Fixed

I've been unable to replicate what used to be the issue that condition was avoiding with users adding multiple terms separated by commas in the current core UI.
Earlier Drupal had a textfield there and multiple terms would be entered into one textfield. Stock core doesn't seem to do that now, and we get a multifield widget - so the issue is isolated and it really doesn't need to be so careful about string-munging.

Thanks for the attention and the patch. Sorry it took a long time to get to - I wasn't using this module on current work so it had dropped off my radar a long while.

I'll still be looking for other edge cases, but for now, manually adding targets with commas should work as desired.

dman’s picture

Status: Fixed » Needs work
FileSize
16.13 KB
34.05 KB

Oh Poop. Found that the original issue was with "Autocomplete (tags style)"

Adding a target with commas
Added wrong results

  • dman committed bd843ce on 7.x-1.x
    Issue #2774249,#2873208 - Update tests to include commas in tags style...
Sardis’s picture

Well... I would suggest using different separator for multiple terms in Autocomplete (tags style) widget. And provide a description regarding that separator. E.g. ; symbol could be used as one. It's not that often used in titles (as long as i know). Could do the trick. I can even make a patch if you consider this as a viable option.