If you use a view reference within a field collection the field label displayed on the add/edit form is the same as the name of the parent field collection, not the field's label.

Rolling a patch...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

srycroft’s picture

Status: Needs work » Needs review
FileSize
1.68 KB

This patch fixes the issue for me.

jamsilver’s picture

Title: Wong field label used if view reference is within a field collection » Wong field label used (an field settings ignored) if view reference is within a field collection (or any other entity subform)
Assigned: srycroft » Unassigned
FileSize
2.57 KB

I am also trying to use a viewreference field on an embedded subform on a custom entity type using the inline entity form (ief) module and it is also showing issues.

I have expanded the above patch to make viewreference grab the field settings and other data 'the right way' so it should always work.

jamsilver’s picture

OK, I forgot to also copy this approach on the autocomplete process callback. Updated patch attached.

I've also added a second patchfile which applies cleanly on top of several of the other patches sitting on the viewreference issue queue.

klonos’s picture

Title: Wong field label used (an field settings ignored) if view reference is within a field collection (or any other entity subform) » Wrong field label used (an field settings ignored) if view reference is within a field collection (or any other entity subform)

Wetitling the issue title because it contained an ewwow. You should be caweful when typing weally fast. It's weally funny that @jamsilvew from ComputewMinds twyied to cowwect the title back in #2, but still missed that "w" thewe.

Also, I'm pwetty suwe the "(an field settings ignored)" part has a typo as well, but I don't know if you meant to wite "(any field settings ignowed)" or "(and field settings ignowed)"?

:D

mfrosch’s picture

Issue summary: View changes

I used this module within inline entity form and also had the label problem.
Also the list of views wasn't filtered.

viewreference-1790304-03-complex-entity-form.patch worked for me!
thanks!

tannerjfco’s picture

Title: Wrong field label used (an field settings ignored) if view reference is within a field collection (or any other entity subform) » Field settings do not apply on field collection / inline entity form
Status: Needs review » Reviewed & tested by the community

I was encountering this issue as well as field settings not applying, which caused a handful of undefined index errors. Applying the viewreference-1790304-03-complex-entity-form.patch from #3 resolves the issue and the field is working correctly from within a field collection. I believe this patch is good to go :)

manu manu’s picture

The patch from #3 solved the issue for me too using Paragraphs.

manu manu’s picture

Title: Field settings do not apply on field collection / inline entity form » Field settings do not apply on field collection / inline entity / paragraphs item form

Changed the title since Paragraphs items are affected too.

Softwar’s picture

Title: Field settings do not apply on field collection / inline entity / paragraphs item form » Field settings do not apply on field collection / inline entity / paragraphs item form / multifield

This patch #3 solved my problem with Multifield module.

I changed the title to add Multifield, just in case someone else has this problem.

  • danielb committed db2a100 on 7.x-3.x authored by jamsilver
    Issue #1790304 by jamsilver, srycroft: Field settings do not apply on...
danielb’s picture

Alright, that took a bit of stuffing around to apply but I got there.

danielb’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.