For all of my content types, when I click "Select Media" and then click the "Library" tab on the overlay the images in the media library are not displayed (see attached screenshot). Numerous images are displayed in both the thumbnails and list views in /admin/content/media. If I reupload the desired image everything displays correctly, but the image is duplicated in the library (obviously) so this is not an ideal long term solution. This was functioning a few weeks ago, but there are no errors in /admin/reports/dblog so I can't trace it back to any changes. I'm running Drupal 7.23 with media 7.x-1.3.
I tried upgrading the media module to 7.x-2.x which required File Entity... Installing this didn't change anything and when I tried to revert back to 1.3 without File Entity my entire crashed required a complete reinstall (secondary problem to this post). Thankfully everything is back to normal, but the library tab in the media selector overlay still doesn't show any images.
Comment | File | Size | Author |
---|---|---|---|
#87 | interdiff-2089697-83-87.txt | 440 bytes | BR0kEN |
#87 | media-jquery-update-media-browser-2089697-87.patch | 1.33 KB | BR0kEN |
Comments
Comment #1
ekristen CreditAttribution: ekristen commentedSame problem here, the Library tab in the overlay is always empty.
Comment #2
sylus CreditAttribution: sylus commentedPerchance related to: https://drupal.org/node/1331056?
My problem was the view itself for media browser added the patch and the view + associated media browser worked.
Comment #3
ekristen CreditAttribution: ekristen commentedThe issue for me is that media library is not compatible with jquery ui 1.10
Comment #4
jaredcampbell CreditAttribution: jaredcampbell commentedekristen... I'm running jquery 7.x-2.3+6-dev... how did you solve the incompatibility problem?
Comment #5
ekristen CreditAttribution: ekristen commentedthis should fix it ...
go to sites/all/modules/media/js/plugins
run
patch < media.library.js.patch
Comment #6
jaredcampbell CreditAttribution: jaredcampbell commentedekristen! You Rock! If you're ever in the DC area I owe you a drink.
Comment #7
ekristen CreditAttribution: ekristen commentedhaha, glad it worked.
I live just south of the beltway in Maryland :)
Comment #8
jaredcampbell CreditAttribution: jaredcampbell commentedNo kidding? Small, small world. Hit me up via the envelope in the upper left corner... www.district-trivia.com
Comment #9
aethr CreditAttribution: aethr commentedI experienced the same problem with Media 1.3 after enabling jQuery Update with a patch for jQuery UI 1.10. I create an almost identical patch to solve the issue.
Confirming that this solved the issue for me.
Off-topic but I grew up in Potomac, MD. Small world. :)
Comment #10
tsbah CreditAttribution: tsbah commentedThanks for the patch, ekristen.
Comment #11
tsbah CreditAttribution: tsbah commentedekristen's patch corrects the issue of the Media tab not displaying in the Content drop-down window. But when I click on the Media tab, I get the WSOD at http://localhost/~tsbah/../admin/content/media
Comment #12
SolomonGifford CreditAttribution: SolomonGifford commentedI can confirm this patch solved the issue for us as well. Thanks ekristen.
Comment #13
Smaug CreditAttribution: Smaug commentedYep, it worked for me too. Nice one ekristen.
If it didn't look like it worked, don't forget to clear browser cache too.
Comment #14
andyrigby CreditAttribution: andyrigby commentedThe patch fixed it for me too, media-7.x-1.4. Thanks!
Comment #15
pfaocleNew Git-based patch that should work with Drush make files.
Comment #16
pilotget CreditAttribution: pilotget commentedThank you. The patch solved most of my problem.
The only issue now is that the pager is missing. I have hundreds of images in the library, but only the first 15 are shown with no pager at the bottom. Is this a similar jQuery problem? (I'm using jQuery update to 1.7)
See attached Screen Shot 2014-05-13 at 12.53.57 AM.png
Comment #17
jaredcampbell CreditAttribution: jaredcampbell commentedI'm having the same problem as #16. The images are now displayed resolving the initial problem, but only the last 15 images. This is resulting in my users uploading the same image multiple times since they can't page past the most recent 15.
Comment #18
ChristianSanders CreditAttribution: ChristianSanders commentedThanks EKristen, patch worked great. As with #15 and #16 I too can't see a pager.
Comment #19
sagraham CreditAttribution: sagraham commentedThis patch fixed my issue.
For those unable to get pagination / auto-load / see the pager, the solution on this thread worked for me: https://drupal.org/node/2104493
Comment #20
jaredcampbell CreditAttribution: jaredcampbell commentedsagraham... Thanks for that link. It worked and now I can see more than the last 12 images from the library for the first time since I submitted this bug! =D
Comment #21
rcodina CreditAttribution: rcodina commentedI can confirm #5 patch works with Media 7.x-1.4! I think this issue priority should be updated to Major and commited ASAP because if the library tab doesn't work this module is useless! I know it works on jquery 1.5 but If people like me are forced to upgrade jquery on admin pages then they can't use this module!
I have found out that with this patch:
jquery 1.5 => KO (media popup opens but it's not usable)
jquery 1.7 => OK
jquery 1.8 => OK
jquery 1.9 => OK
jquery 1.10 => OK
Without it:
jquery 1.5 => OK
jquery 1.7 => KO (library tab empty)
jquery 1.8 => KO (library tab empty)
jquery 1.9 => KO (library tab empty)
jquery 1.10 => KO (library tab empty)
Finally, thank you sagraham for your link. The patch there also works for me!
Comment #22
dkmn CreditAttribution: dkmn commentedYeah, I agree. Why is this not folded into the development line?
Comment #23
rogerpfaffI'm using Bootstrap 3 / Jquery-Update 2.4 / ckeditor 4 and the patch is not working for me. Choosing Seven as content editing interface makes it functional.
Comment #24
xaa CreditAttribution: xaa commentedhi, I'm also using Bootstrap3 with the latest jquery version (+Rubik as Administration theme).
"The issue for me is that media library is not compatible with jquery ui 1.10"
Indeed. So if you don't want to patch the module (awaiting the official release ;)) and if your backend doesn't need to use the latest Jquery version a workaround is simply to adjust the jquery version used for the backend
(see /admin/config/development/jquery_update : "Alternate jQuery version for administrative pages" > select 1.5 will fix the issue).
Comment #25
chaloum CreditAttribution: chaloum commentedthe #5 patch displays the images but I cant submit when picking an image from the library
Comment #26
baltazarz3 CreditAttribution: baltazarz3 commentedIm working on superhero's drupal theme and i wasnt able to change jquery versions or ui. ekristen's patch worked for me. thanks so much!
Comment #27
dooug CreditAttribution: dooug commentedI was able to replicate the original issue. The patch from #15 did the trick. However, I modified the patch to not include the additional newline at the end of the file.
Marking as RTBC because of numerous reviews. The cases which the patch didn't solve the problem seemed to be because of other jQuery versions or admin themes issues as in #23.
Comment #28
madeby CreditAttribution: madeby commentedMy images are loading but when I scroll to the bottom it doesn't load more images and I have no pagination.
Any ideas?
Comment #29
dooug CreditAttribution: dooug commented@madeby, did you try the solution in #19 that references this issue: #2104493: Media Browser only shows 1 page of results (Media v1)
Comment #30
cmunk CreditAttribution: cmunk commented#24 worked for me!
Comment #31
madeby CreditAttribution: madeby commented#29 @dooug it worked! Thanks.
Comment #32
mtrax CreditAttribution: mtrax commented@dooug applied patch but still see no images in the library and can see media when I view Content page but not when creating article and clicking add media
..update setting JQuery Update to version 1.5 fixes the problem
Comment #33
agileadam#27 worked perfectly for me. Thanks!
Comment #34
blasthaus CreditAttribution: blasthaus commentedThe only problem I had with this was that when scrolling down in the media browser, at least on Safari the page itself would scroll out of view. The fix was to add a class of 'fixed' to the body when a popover occurs. Since it's really only an issue due to this idea of scrolling down in a modal which is broken
I did the following:
file: media.popups.js
in Drupal.media.popups.mediaBrowser
after the call to mediaIframe.bind() add
$('body').addClass('fixed');
Then everywhere that the popup is dismissed (ok, cancel, finalizeSelection) add
$('body').removeClass('fixed');
Finally the css rule (and I'm not sure where this goes). I put it in my admin theme and default theme.
Would be cool to also include this in the above patch, so this issue is solved.
Comment #35
Tomefa CreditAttribution: Tomefa commentedThanks for the patch, it works fine now !
I think it's a good idea to make a new release of the media module, because that's a really annoying bug on almost all the recent website.
Same comment goes for the patch here : https://www.drupal.org/node/2104493
Comment #36
steinmb CreditAttribution: steinmb commentedEnviroment
Latest stable Drupal relase
query_update (7.x-2.4)
Media 7.x-1.x
Browsers: Chrome Version 38.0.2125.101 - Firefox 32.0.3
Platform: OS X
PHP 5.5.x
MariaDB 10.x
Patch #27
How to reproduce
Clean installation of Drupal and Media 7.x-1.x. Running with core jquery and the module work OK, both latest stable and latest dev. Installing jquery update make the query/req. fail. Jquery version 1.7 or higher. Applying the patch does nothing on my system to fix this.
Easiest way to verify this is loading the following page (replace flickr.dev with your test site).
http://flickr.dev/media/browser?render=media-popup&types[audio]=audio&types[image]=image&types[video]=video&types[default]=default&activePlugins=&schemes[youtube]=youtube&schemes[public]=public&file_directory=&file_extensions=png+jpg+gif+jpeg&max_filesize=&uri_scheme=public&plugins=undefined
Clicking the library tab trigger no POST req. so it remain empty.
Comment #37
rcodina CreditAttribution: rcodina commented@steinmb Have you tested all patches enclosed in this issue? It works great for a lot of people.
Comment #38
steinmb CreditAttribution: steinmb commentedRef. my tests in #36. I tested patch #27. It is unusual to test them all :) Only one will get committed to dev. if it actually fix the issue. To make sure I did not bork my testing environment, I'll will run my tests again.
Comment #39
Tomefa CreditAttribution: Tomefa commentedTry right now with simpletest.me : http://s1260f45135f61f4.s3.simplytest.me
Add module media (with dependencies) + add module jquery_update (enable it).
Change the field image of the article content type to widget type : media file selector.
And then the library tabs doesn't work anymore.
Comment #40
ZalemCitizen CreditAttribution: ZalemCitizen commentedThanks for this patch!
Comment #41
srobert72 CreditAttribution: srobert72 commentedPatch #27 works for me.
My configuration :
Media : 7.x-1.4
Media_Youtube : 7.x-2.0-rc4
JQueryUpdate : 1.10
JQueryUpdate for Admin : 1.8
Comment #42
steinmb CreditAttribution: steinmb commented@srobert72 Any chance for you to try without the patch but with dev versions: Media : 7.x-1.dev
Media_Youtube : 7.x-2.0-dev ? Was unable to see the patch fix the problem back in #36.
Comment #45
corbacho CreditAttribution: corbacho commented@steinmb I had the same problem: empty Library http://monosnap.com/image/LCT2hR5rYXMHNJfDJQ5bChHk7GsDV0
with jQuery Update:
jQuery 1.7
Media 1.4
I tested with media dev 1.x but didn't fix anything. I reverted back to Media 1.4, apply #27 patch and it solved the problem!
Comment #46
Anonymous (not verified) CreditAttribution: Anonymous commentedThis works. Marking this as RTBC.
Comment #47
johan.falk.oddhill CreditAttribution: johan.falk.oddhill commentedIt works for me when i switch the "jQuery and jQuery UI CDN" to jQuery under jQuery update configurations.
Comment #49
aaron CreditAttribution: aaron commentedCommitted to http://drupalcode.org/project/media.git/commit/8851cb1.
Comment #50
Dave ReidDid anyone confirm this patch works *without* jquery_update and just native Drupal core + Media? All I see are confirmations that it works with jquery_update being used.
Comment #51
steinmb CreditAttribution: steinmb commented@dave reid, I do not think so. Also look at #36 I was unable to get this patch to fix anything...
Comment #52
J McDermott CreditAttribution: J McDermott commented8851cb1 does not appear to work without jquery_update. Media 7.x-1.4+2-dev without jquery_update, however, worked well on the same installation.
Comment #53
Dave ReidYes, confirmed on simplytest.me this is a regression. We cannot simply code our JS for the versions of jquery_update, we need to consider something that works for both newer and the default version that ships with core, always.
Comment #55
Dave ReidReverted the commit and setting back to needs work. Please make sure patches are tested under both default and newer versions of jQuery prior to commit.
Comment #58
kikko CreditAttribution: kikko commentedThanks guys: with a superhero ME theme switch administration jquery to 1.5 it work (media 7.x-1.4)
Comment #59
michenus CreditAttribution: michenus commentedThank guys. #27 helped: Version jquery 1.10.
Comment #60
michenus CreditAttribution: michenus commentedThank guys. #27 helped: Version jquery 1.10.
Comment #63
rsacher1 CreditAttribution: rsacher1 commentedSorry for my ignorance as a Drupal-newbie:
...how do I apply the patch?
...can I download an already patched version?
Comment #64
MichaelGreisman CreditAttribution: MichaelGreisman commented#27 fixed this issue for my site, which uses jQuery 1.7.
@rsacher1, try these directions:
but failing all else, read the patch file:
sites/all/modules/media/js/plugins/
;That is now enough info to get you into trouble. Oh yeah, back it up first!
Comment #65
aaronott CreditAttribution: aaronott commented#27 just worked for me as well. We are using jQuery 1.8 and the library is now displaying the images as expected.
Thanks @pfaocle and @dooug!!
Comment #66
jennypanighetti CreditAttribution: jennypanighetti commented#27 worked for me as well, with Media 1.5 and jQuery 1.8. THANK YOU!
Comment #67
mr.marlin CreditAttribution: mr.marlin commentedI had the same issue where no images appeared within the Library tab.
My configuration: Drupal 7.34, Bootstrap 3, Media 7.x-1.5 and jQuery Update 7.x-2.5
To make work, I needed to make the following Configuration settings:
- jQuery Update "Alternate jQuery version for administrative pages" set to 1.5
- Media Browser settings - set Media browser theme to "Seven"
- Flush all the caches
Now it works. Thank you to #23 Rodgerpfaff for mentioning the Media browser theme to "Seven". That was the key to making my configuration work.
Comment #68
Joachim NamysloCan confirm that evrithing works fine with
Bootstrap 3
Current Drupal 7 Release
The Seven Theme for Media in the Media Browser Settings Dialog
The Settings Below
Comment #69
rcodina CreditAttribution: rcodina commentedCould anyone make a patch which works with both default drupal jquery version and more recent versions which can be enabled via jQuery update module?
This issue is two years old, it is time to fix this. Most people on D7 needs to use jquery with versions greater than 1.5 for contributed modules/themes to work properly.
Comment #70
franz.skaaning CreditAttribution: franz.skaaning commented#68 makes no sense since Bootstrap3 requires more than jquery 1.5. You get some strange results with edit/add nodes for users with no admin theme.
This works fine with jquery 1.5, but not with anything other.
Comment #71
Joachim NamysloThis is just a try. The test protocoll said the first line was missing so I added it. We'll see if that works
Comment #73
rcodina CreditAttribution: rcodina commented@dinmikkith Thanks for your efforts Your patch looks very similar to #27 which was rejected because it doesn't work with drupal's default jquery version. Are you sure your patch works with drupal's default version too?
Maybe we can introduce an "if" depending on jquery version. Then use "bind" or "on" depending on that value.
Comment #74
Joachim NamysloAs I said I just changed the first line, because the previous test protocol told us it fails because the line was missing. I am not even sure if the patch will get merged now because I don'tt have the permission to start simple tests here.
You're right. I have nat changed a bit of the rest of the code
Comment #75
SandraVdv CreditAttribution: SandraVdv commentedNo patch needed with jQuery Update 7.x-2.5 and Media 7.x-1.4+7-dev. The JQuery Update jquery version for administrative pages is set to "Default (provided by Drupal)".
The only thing that keeps me from updating to Media 7.x-1.5 is that the media/browser/list page callback has disappeared from media.browser.inc??
There is only a media_browser_library() available...
Comment #76
Joachim NamysloJust to clarify. Media does always use the admin interface version because it's displayed with the admin theme, right? So what exactly is the problem with taking #27 and make j query update a dependency of media. Or in other words why does the core still need v1.5 while we are at 1.10. Can someone point that out, please?
Comment #77
rcodina CreditAttribution: rcodina commented@dinmikkith Because using 1.10 on admin pages may break many other modules. I think the solution is simple: to just add the "if" I suggested on #73.
Comment #78
fizk CreditAttribution: fizk commentedThis works for me, with and without jquery_update enabled.
Comment #82
fizk CreditAttribution: fizk commentedMy previous patch was missing "index baa49e4..6c2684f 100644", that might be way the test is failing.
Comment #83
BR0kENThe patch #82 works, but I didn't make a review because it contains code duplication and can be improved. I improved it and now an events occurs on different versions of jQuery.
Comment #84
sirko_el CreditAttribution: sirko_el as a volunteer and at FFW for FFW commentedI've used #83 on my project. It works fine for me and code looks nice and clean.
Comment #85
gaydamaka CreditAttribution: gaydamaka as a volunteer and at Propeople (now part of FFW) for FFW commented#83 works fine for me.
Comment #86
m1r1k CreditAttribution: m1r1k at Propeople (now part of FFW) for Propeople (now part of FFW) commentedIf ajax request will contain new drupal.settings from Drupal backend, only these new settings will be passed to settings variable, so check it, otherwise you will got js unexpected error.
Comment #87
BR0kENYep, agree with you.
Comment #88
m1r1k CreditAttribution: m1r1k at Propeople (now part of FFW) for Propeople (now part of FFW) commentedLooks fine :)
Comment #89
Joachim NamysloA bug and 89 comments later. It would be great to see this merged in to the next stable asap.
Comment #90
jerrac CreditAttribution: jerrac commentedI just ran into this issue on a site I'm building, and the patch from #87 fixed it.
So, yes, merging it into stable would be nice. :)
Also, thanks to all the people over past 2 years who figured this out so I don't have to. :D
Comment #91
fenstrat+1 for RTBC.
Can also verify this works with jquery_update (through to 1.10), or without jquery_update.
Comment #92
Albert Volkman CreditAttribution: Albert Volkman commentedAnother +1 for RTBC.
Comment #94
smptebars1 CreditAttribution: smptebars1 commentedCan this patch be applied if I am running query-update 7.x-2.6?
Thanks
Comment #95
fenstrat@smptebars1 Yes. The patch works with or without jquery_update (personally I've tested up to jquery 1.10 with 7.x-2.6).
Comment #96
smptebars1 CreditAttribution: smptebars1 commented@fenstrat, Thanks
Comment #97
Dave ReidComment #99
Dave ReidCommitted #87 to 7.x-1.x. Thanks everyone!