Hello!

Use case:

  • I have a reference field of taxonomy term with hierarchy.
  • I discovered Taxonomy Container module to create optgroups in entityreference select lists via hierarchy. This is perfect! Except...
  • That module's widget works on a content type form display correctly but in YAML Form, it displays with missing parents

I don't know if this is a simple bug to fix, if there is a deeper issue or if this should be fixed in taxonomy_container itself. I will spend more time investigating the code but I was wondering if you would know right away.

Here is a screenshot illustrating the issue.

Comments

ptsimard created an issue. See original summary.

jrockowitz’s picture

Assigned: Unassigned » jrockowitz
Category: Feature request » Bug report

This issue is in the YAML Form module because I am flattening the options here.

I will fix it and post a patch ASAP.

jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new3.57 KB
ptsimard’s picture

StatusFileSize
new2.72 KB

Wow that was a fast turnaround!

So I applied the patch. It did change the data but not as expected.

See screenshot:

ptsimard’s picture

Status: Needs review » Needs work
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new3.56 KB

Please try this patch.

ptsimard’s picture

Seems to be working well now! Good work =)

ptsimard’s picture

StatusFileSize
new89.38 KB
new89.38 KB

Actually there seem to be a few issues.

I'm getting:

An illegal choice has been detected. Please contact the site administrator.

on that dataset field when it has selected elements and I try to go to a next wizard page.

Recent log messages have many of these type of errors:

Illegal choice 3 in Dataset element.

If I leave dataset selection empty and go to Next wizard page and click previous I get this:

  • jrockowitz committed 176e1c1 on 2808301-taxonomy_container
    Issue #2808301 by jrockowitz, ptsimard: Integration for Entityreference...
jrockowitz’s picture

StatusFileSize
new4.75 KB

I replicated the issue locally and the attached patch should handle the error.

Status: Needs review » Needs work

The last submitted patch, 10: integration_for-2808301-10.patch, failed testing.

  • jrockowitz committed e354311 on 2808301-taxonomy_container
    Issue #2808301 by jrockowitz, ptsimard: Integration for Entityreference...
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new6.15 KB

Status: Needs review » Needs work

The last submitted patch, 13: integration_for-2808301-13.patch, failed testing.

  • jrockowitz committed 50556cf on 2808301-taxonomy_container
    Issue #2808301 by jrockowitz, ptsimard: Integration for Entityreference...
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new6.1 KB
jrockowitz’s picture

WOOT! @ptsimard Please test the patch and I will commit it ASAP.

ptsimard’s picture

Status: Needs review » Reviewed & tested by the community

I tested patch 15 and it seems to work fine!

As for the other error

If I leave dataset selection empty and go to Next wizard page and click previous I get this:

it is unrelated to this so I will create a new issue with more information.

Thank a lot! I've never seen this fast a turnaround time on D.o!

  • jrockowitz committed eae5d27 on 8.x-1.x
    Issue #2808301 by jrockowitz, ptsimard: Integration for Entityreference...
jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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