The list of embed display options in the embed dialog is supposed to be restricted by the "Allowed Entity Embed Display plugins" selected on the button configuration page. It does not. It just keeps showing the entire list of options.
The problem traced to inconsistency in how the $available_plugins and the $allowed_plugins arrays are formatted. The base array returned from entity_embed_get_entity_field_formatters() would then be processed in what should've been the same way every time. That extra processing should be consolidated in the function itself to prevent errors like this from happening.
There's good documentation in this area of the code, so I think I can patch this one without having to make too many baseless assumptions about how stuff is intended to work.
Comments
Comment #2
adarkling commentedComment #3
devin carlson commentedComment #4
adarkling commentedRerolled patch to work with current 7.x-3.x-dev release.
Also moved patch #2634350-2 to entity_embed_get_entity_field_formatters() for expanded availability.
Comment #5
froboyPatch works for me.
For folks coming here later, I was receiving the message "No display options available for the selected entity. Please select another entity." if I selected any items in display plugins list, even when they existed for the entity I was selecting.
Comment #6
froboyComment #7
runephilosof commentedI have the same issue as froboy.
However, this patch did not fix it for me.
It is easily reproducible with the Commons distribution.
Just limit to any display plugin for the file embed button (/admin/config/content/embed-button/list/file/edit).
Also fails if you "limit" to all the plugins.
Comment #8
adarkling commentedPatch still applies & works properly here under 7.50 Core
Comment #9
devin carlson commentedA reroll of #4 with a few minor changes:
Immediately overwritten. Removed.
Duplicated comments from above for simplicity.
Left out $as_labels parameter as it isn't used anywhere. It could be added in a separate issue if necessary.
Users should still be able to embed files when the File Entity module is unavailable, they just can't use the Rendered Entity formatter.
Removed per above comment RE: function parameter.
Comment #10
devin carlson commentedTested #9 and committed to Entity Embed 7.x-3.x. Thanks!