We have applied the patch of https://www.drupal.org/node/2534724. The patch in the issue works but changes the JQuery which highlighting an other bug:
If we use a media in a custom form, the field doesn't work. We see only the attach button and it doesn't work. After search, we find the problem comes of the function theme_media_element where the #id in injected two times in the markup. So, the JQuery doesn't find correctly the element on fields create with form api.
We did a patch to add a prefix on the id's wrapper, this fixes the problem.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | media-browser-double-id-2705001-7-d7.patch | 458 bytes | eelkeblok |
Comments
Comment #2
clairedesbois@gmail.comComment #3
clairedesbois@gmail.comComment #4
clairedesbois@gmail.comComment #5
cornifex commentedTested the patch in #2 and works like a charm.
Comment #6
heatherwoz commentedWorks for me too (combined with the patch in https://www.drupal.org/node/2534724)
Comment #7
eelkeblokThanks for figuring this out, saved me a ton of debugging, I'm sure. The patch works, but I would suggest to use a dash instead of an underscore for the wrapper-suffix. Attached is an updated version of the patch. I suppose this will also needs some test coverage, right?
Comment #8
damienmckennaComment #9
damienmckennaThe patch in #7 solved the problem for me, both using the Seven and Shiny admin themes. Thanks!
Comment #10
dmsmidtAnother +1
Comment #11
chris matthews commentedRecent 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
Comment #12
damienmckennaReopening this as it affects the admin side of the module, not the front-end output.
Putting it back to "needs work" as we need to clearly document the steps to reproduce the problem.
FWIW I ran into this problem on a site which used a file field in a custom block's config form.