I'm trying to add some nodes using "inline enity form - Complex" for multiple entries. However, after creating a new node and saved, the title showed as "%AutoEntityLabel%". If I save the whole node, quit and come back again, these nodes under inline entity form displayed normally. I am using "Automatically generate the label and hide the label field" setting by the way. Any idea?
Comments
Comment #2
shablm commentedThis issue exists in Drupal 7 version also. I have the latest version installed, and this issue still exists.
Comment #3
Bensbury commentedSame issue too in Drupal 7.
It used to work fine on a site we have, at some point recently we got a report of %AutoEntityLabel% being returned from an inline entity form. If the node is saved and then re-opened (edit) it displays correctly.
We think that the token is trying to pull the value before the entity is created fully and so is returning the token name.
Would that make sense? We will look into it, but someone with better knowledge of the module should maybe be able to figure out if a recent change would be responsible?
I've tested this on an older version of our site in question. Version 1.3 works fine.
Version 1.4 and 1.4+5 (dev) both return %AutoEntityLabel%.
So this suggests the issue is with the module and something that changed in the update.
Hope that helps find the problem.
Thanks.
Comment #4
ikeigenwijs commentedWe also only 'recently' have this issue in d7.
Comment #5
purushotam.rai commentedComment #6
guptahemant commentedHere I have created a patch to produce the rendered label correctly.Also I have observed that inline entity form doesn't actually save the entity until you press save button on host entity, hence used the hook_inline_entity_form_table_fields_alter(). to create a new auto label field.
Please review.
Comment #7
gg24 commentedHi @guptahemant,
I am able to cleanly apply the patch and patch resolves the issue as well.
Thanks for the patch. Issuing RTBC to this issue.
Thanks!
Comment #8
OnkelTem commentedI confirm it works for me too.
Comment #9
yogeshmpawarLooks good to me, +1 for RTBC.
Comment #10
rgnyldz commentedPatch for D7 ??Can be found in this issue
Comment #11
demonde commented+1 Works for me
Comment #12
markdc+1 This works great. Thank you!
Side note: I manage two D8 sites with this setup and both titles just come up blank, no %AutoEntityLabel% as mentioned by op.
Comment #13
geraldito commentedpatch from #6 works like a charm. thanks!
Comment #14
zekvyrin commentedPatch works for me as well.
Thanks!
Comment #15
geraldito commentedThe patch from #6 doesn't work with the latest official release (8.x-2.1-beta1). In the first moment it seems to get saved and is shown correctly in the form, but when saving the mother node an error message like (translated from spanish) "This entity (node: %AutoEntityLabel%) can't be referenced".
Comment #16
dakwaminePatch #6 applies and works on dev branch.
Composer info
Commit: 101b69dc799113d1485f5fe89b9fee07f6308522
Version: 8.x-2.1-beta1+15-dev
Datestamp: 1536175980
Other patches applied
#2923876: Broken when provider !=entityTypeId
Comment #17
scottsawyerI am getting an error with this patch when using ief_table_view_mode.
That module provides an extra field "Title" that is used in the widget display ( when closed ).
Line 90 in auto_entitylable.module looks like this:
Evidently one (or more) of the 'label' keys doesn't exist.
Comment #18
scottsawyerFor testing, I wrapper the entire thing in an if statement.
This results in the extra field not displaying at all.
It's weird because I have an older version of this site where this patch worked perfectly.
Comment #19
colan@scottsawyer: Did you apply the patch to HEAD (the up-to-date dev branch, not the last release)? If not, please try that. If it still doesn't work, did you try also applying the other patch mentioned in #16?
Comment #20
scottsawyer@colan, I am using the latest 2.x-dev using this patch and the most recent patch from #28 in 2923876.
I filed 3067682 since that is how I discovered the problem. That issue was closed and redirected here.
Comment #21
colanThanks for the update. Setting status appropriately. Patches welcome as I don't plan to be working on this myself.
Comment #22
colanComment #23
mnico commentedI attach the same patch with a small change. The behavior of label field was changed.
Comment #24
colan#23: Please provide interdiffs when updating patches: https://www.drupal.org/documentation/git/interdiff
Comment #25
mnico commentedUploaded interdiff file
Comment #26
brandonratz commented@mnico Patch #23 appears to work for fixing the title display but when saving the parent node I receive the following error
This entity (node: %AutoEntityLabel%) cannot be referenced.Update: This was related to a entity reference view
Patch works
Comment #27
nikitaaswani commentedComment #28
nikitaaswani commentedI was able to reproduce the issue by following steps:
1. In basic page content type , changed the automatic label setting to Automatically generate the label and hide the label field.
2. In article content type, added a new entity reference field to basic page content type.
3. While adding content for article content type, issue was reproducible.
Patch #23 applies cleanly.
Issue is no longer reproduced after the patch.
Moving ticket to RTBC.
Thanks!
Comment #30
colanThanks!
Comment #32
alexborsody commentedWorks for me thanks
Comment #33
dhiraj bhagat commentedNot working for me. Issue still exist, for different user role.