I'm trying to reference a field in a new created profile in a custom content type. I added a reference field to my custom content type and chose profile as the reference source. On the field definition form, it lists a bundle field as required input, but there is not field shown. Also, there is no explanation as to what a "bundle" is. (see picture.

bundles

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zoon_unit created an issue. See original summary.

mglaman’s picture

Version: 8.x-1.0-alpha2 » 8.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

There was some funk with profile bundles; with #2641368: PluginNotFoundException committed, can you try this against -dev?

dakala’s picture

Assigned: Unassigned » dakala

I suppose we need to implement an @EntityReferenceSelection plugin

dakala’s picture

Attached patch is a first attempt at a solution for this issue. The screenshots show Profile listed in the Reference group when adding new fields and the output.

Add
Form
Display

dakala’s picture

Status: Postponed (maintainer needs more info) » Needs review

@mglaman: Sorry I nicked this issue :-) I've just noticed the status and changed it.

mglaman’s picture

+++ b/src/Plugin/EntityReferenceSelection/ProfileSelection.php
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * Contains \Drupal\profile\Plugin\EntityReferenceSelection\TermSelection.
+ */

Copy and paste whoopsie :) Also, we no longer need file document blocks for files with a single class.

I'll test this out

  • mglaman committed ecefe32 on 8.x-1.x authored by dakala
    Issue #2670688 by dakala: Bundle field required but not shown
    
mglaman’s picture

Status: Postponed (maintainer needs more info) » Fixed
FileSize
1.56 KB

Looks great, thanks!

Status: Fixed » Closed (fixed)

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