When limiting display modes via the media_wysiwyg module (awesome!) you are able to set it to 1 option, but the dropdown remains. This patch adds a count($options) and sets #access to FALSE if 1 or less are available. (minor ux cleanup).

Comments

dave reid’s picture

Component: Media WYSIWYG View Mode » Media WYSIWYG
dave reid’s picture

Revised and cleaned up.

Status: Needs review » Needs work

The last submitted patch, 2: 2390081-media-embed-display-hide-one-option.patch, failed testing.

eelkeblok’s picture

Status: Needs work » Needs review

Patch looks fine to me and test results are no longer available. Setting back to needs review to get the new test system to pick it up.

eelkeblok’s picture

Trying a re-upload to see if this will get it to be picked up. Credits to Dave Reid and Rob C.

eelkeblok’s picture

Status: Needs review » Needs work

The last submitted patch, 5: 2390081-media-embed-display-hide-one-option.patch, failed testing.

eelkeblok’s picture

Apart from the reroll that's needed, there is a functional problem with the patch. I tested against RC3, but I expect things have not changed since then in this regard.

The problem is that the selection is instrumental in inserting the correct media wysiwyg token, as it is used by the javascript part to insert the correct viewmode in the token. So, simply removing the element from the form entirely is not going to cut it, it would need to be turned into a hidden element for the JavaScript to continue to work.

chris matthews’s picture

Status: Needs work » Closed (outdated)

Recent versions of media have resolved most of peoples concerns and is compatible with entity translation, multilingual and various advanced configurations. Due to the high volume of inactive and most often irrelevant issues we are Closing this as (outdated). If for whatever reason this issue is important to you AND you still have issues after checking the media recipe documentation, then let us know and we will review your concerns.

Otherwise, see the recipe documentation for how to configure media and for troubleshooting tips OR refer to the media_dev distribution if you want to see a working media setup.

As mentioned, feel free to make some noise in this issue if you still feel it is important to you or someone else.

Thanks,

Media team