- Issue created by @LoranRendel
- πΊπΈUnited States apmsooner
It's purposefully limited on those widgets to prevent performance issues. Anything over 50 or arguably even less should be using an autocomplete widget.
This is very odd and irregulat behaivior to show only 50 options and cut out everything above this internal limit, and I guess, it is not documented anywhere.
There should be a setting or somethike like that.Also the problem is: I open an entity to edit, it has the value above these 50, and it is resetted on the form.
- πΊπΈUnited States apmsooner
For #4, Yeah, core entity reference option widgets also have a limit but we could improve this with settings (within reason) and notification around the limit. I'm currently in process of refactoring the form widgets though that will be available in 4.x version so I don't really want to add new settings prior to that. I don't know exactly what you mean on #5.
FYI, i don't know how many items you have available to references but options widgets have to have some sort of limit or you could have a considerable performance hit in the form. The field settings form itself could be unusable without some sort of reasonable limits in place as there is an underlying default value form that uses the same widget so we can't just allow loading of an unlimited number.
- πΊπΈUnited States apmsooner
I would recommend an autocomplete widget as an alternative or you could also try enabling the custom_field_entity_browser sub-module if you wanted to go that route where you have more control with a view to select items from.
In #5 I mean if I open some node with already filled Custom field value, the form will show the empty option as selected, and when I save the node I will lose the actual value of this subfield. This may happen if another items were added to the referenced Entity type and when filtered '#options' does not contain the actual value of the field.
The number of items is less than 100, it's the names of structural divisions of the organization in my case.
Initially I've used Entity Reference basic field type provided by Drupal engine, it shows all the options (as multiple Select), but then I'll need to link some additional data and made a Custom Field with two subfields.- πΊπΈUnited States apmsooner
Okay, I think the core limit might be 100 so I can change ours to match that with a patch for now. Changing the status of the issue to task since its still not really a bug and again if your reference count exceeds 100 at some point, there's not much I can do for you as I really can't recommend these widget types in this case.
- πΊπΈUnited States apmsooner
I upped the limit to 250. You can use the patch.
-
apmsooner β
committed 12d23e2e on 3.1.x
Issue #3540748 by apmsooner, loran@xpor.org: Entity reference subfield...
-
apmsooner β
committed 12d23e2e on 3.1.x
-
apmsooner β
committed 12d23e2e on 4.0.x
Issue #3540748 by apmsooner, loran@xpor.org: Entity reference subfield...
-
apmsooner β
committed 12d23e2e on 4.0.x