Closed (fixed)
Project:
Automatic Entity Label
Version:
8.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2017 at 16:31 UTC
Updated:
23 Nov 2017 at 09:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
anavarreYes, same request here. The module works fine when creating a regular node but in the context of an inline_entity_form creation the node title will be displayed.
What happens is that you can add a random node title and it will be successfully replaced as expected, but that's a pretty ugly workaround and certainly not optimal from a UX perspective.
Comment #3
sutharsan commentedSince a note title is a required field, this bug makes it impossible to add data that has a hidden title field. Therefore I'm raising the priority to Major.
Comment #4
jonathanshawI don't know if this is optimal, but it's simple, lightweight and works for me.
We need to use IEF's own form alter hook, and allow for the fact that for IEF child forms $formState->getFormObject()->getEntity() returns the parent entity, not the child one, where as $form['#entity'] holds the child.
Comment #5
geraldito commentedThanks @jonathanshaw ,patch from #4 works fine for me.
Comment #6
sutharsan commentedPatch looks Ok and works as expected.
Comment #7
peacog commentedRe-rolled after recent commits
Comment #8
giorgosk#7 does not apply to latest dev version or latest beta1
#4 applies cleanly with just a warning
but its not really working as it should
one must input something on the title field to get passed validation and later on the autolabel is created
Comment #9
peacog commentedMy mistake - the patch from #4 applies just fine against 8.x-2.x. I was still on 8.x-1.x. I'm removing the patch from #7 and reverting status to RTBC.
Comment #10
giorgoskI just said #4 applies but does not work
I think it needs to be reviewed before commited
Comment #11
jonathanshaw#4 works OK for me. Can you say more, can you give steps to reproduce what you see as "not working"?
Comment #12
dman commentedLooking for this today.
inline_entity_form is actually my main and only reason for wanting to use this module, as I have a 'joiner' node that's just a data holder, and the title is actually irrelevant to the item at edit time.
Comment #13
sutharsan commentedNone of the patches still apply to 8.x-2.x.
Re-rolled and made the following changes:
- Changed the order of the functions. First the
hook_form*_alter()then theauto_entitylabel_prepare_entityform()- Moved
if ($form_entity instanceof ContentEntityInterface)tohook_form_alter(). No need for this check inhook_inline_entity_form_entity_form_alter()as IEF only works with content entities.- Removed
if ($entity instanceof AutoEntityLabelManagerInterface)because$decorator->decorate()always returns AutoEntityLabelManager.- Added docblock comment to
auto_entitylabel_prepare_entityform().Comment #14
sutharsan commentedComment #15
ribelI have reviewed and tested patch #13 and it works good for me with IEF + ECK.
Comment #16
yobottehg commentedthis patch needs a rebase because it does not apply on 8.x-2.x anylonger
Comment #17
ribel@yobottehg, This patch is not needed anymore because it was merged to 8.x-2.x-dev with another patch.
See related issue and this commit.
@RenatoG, could you close this issue, and set the credits?
Comment #18
sutharsan commentedI support call to correct the missing credits. See #2896979-6: Add an option to automatically prefill the label
Comment #19
pepemty commentedHello. Great work here with this module. Thanks, really.
What about pushing the most recent dev into the next Beta so Composer can pick it up...?
Warm regards from sunny México.
: )
Comment #20
purushotam.rai commentedAs verified, this issue has been fixed in the other issue, I understand that the commit credit could have been more organized, but reverting things will make it complicated and hence I feel we should move forward setting up apt credits now.
Kindly let me know if we are not on the same page. Thanks to all for all your inputs, it's definitely very valuable to the community and the module.
Thanks and Regards
Comment #21
purushotam.rai commentedMarking the issue as fixed.