Closed (fixed)
Project:
D7 Media
Version:
7.x-1.x-dev
Component:
Media Browser
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Oct 2013 at 03:45 UTC
Updated:
19 Mar 2015 at 02:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mike-n-garrett commentedAttached is the patch.
Comment #2
ParisLiakos commentedwhat you mean with this..seeing your patch you just convert the jquery calls to plain javascript ones. the functionality should be the same
Comment #3
damienmckennaClosed another duplicate: #2111695: "You have not selected anything!" when not on page 1 (Media v2)
Comment #4
damienmckennaRelated: #1956620: Pager on library tab always reloads page 1.
Comment #5
mike-n-garrett commented@ParisLiakos: the use of jQuery in the code was not working at all. It wasn't just that the code had errors it was that the use of jQuery in this circumstance was wrong.
Any way we can get this into the next release of this module?
Comment #6
Anonymous (not verified) commentedJust added it to my site, and it is now working.
Comment #7
xaqroxAlso working for me. Thanks!
Comment #8
damienmckennaFYI, for anyone using AdvAgg it's recommended to update it to v7.x-2.3, which fixes some compatibility problems there.
Comment #9
damienmckennaLets keep this focused on v1, which has very different JS than v2.
Comment #10
damienmckennaBumping this to a Major bug report as it's kind of a glaring problem.
Comment #11
jcfiala commentedI applied it to the media module and it's really helping, although I notice that the browser only shows the first 40 items in total.
But, the javascript now works.
Comment #12
jaredcampbell commentedThis also partially fixes https://drupal.org/node/2089697
Comment #13
rcodinaI can confirm patch on #1 works for me on Media 7.x-1.4! It also works well in combination with the patch from ekristen user found here:
https://drupal.org/node/2089697
This other patch makes media 7.x-1.X compatible with newer versions of jQuery (>1.5). See https://drupal.org/node/2089697#comment-8823747
Comment #14
dooug commentedI second the message in comment #13 above.
Comment #15
agileadamJust as a heads-up, because this issue is where I started my troubleshooting: I was unable to get anything more than the first page of results in the Library tab due to a non-unique #scrollbox div. I found the culprit to be the brightcove_media module. I realized this because Drupal.media.browser.library.prototype.scrollUpdater() wasn't being called. The scroll bind on #scrollbox wasn't working. I found two divs sharing the same ID. I fixed this here: #2350197: Using non-unique ID on several elements
Comment #16
bcjmpr commentedI'm using jQuery Update 7.x-2.4, and another solution could be to select version 1.5 of jQuery on "Alternate jQuery version for administrative pages" in the module settings. Doing that, I could finally see the library when adding content.
Comment #17
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/2089697
Comment #18
steinmb commentedUnable to reproduce this error in the latest dev. Are all that sees this bug using jquery_update?
Comment #19
steinmb commentedComment #20
rcodina@steinmb Yes, we are using jquery_update module.
Comment #21
steinmb commentedTry upgrading to 7.x-1.x-dev.
Comment #22
szczesuil commentedyay. patch #1 worked for me. thanks so much. i was having to upload files multiple times. it was a drag. besos.
Comment #23
tomefa commentedSteinmb, i didn't try with the dev version but because it's for a production website i can't.
They won't accept a dev module :/
But if the dev fix this and become stable, may be it's time for a new release of media ?
Comment #24
jacktonkin commentedThe code in both 7.x-1.4 and 7.x-1.x-dev is incompatible with jQuery 1.6 or greater.
In prior versions of jQuery the attr() method retrieved DOM properties as well as attributes. This changed in version 1.6 with the introduction of the prop() method. The patch in #1 above correctly (IMO) uses regular javascript to retrieve the scrollTop, scrollHeight and clientHeight properties, fixing the issue for newer versions of jQuery while maintaining compatibility with jQuery 1.5.
I have tested this patch against 7.x-1.x-dev using jQuery 1.5 and 1.7 and it works with both.
Comment #25
Anonymous (not verified) commentedGreat patch, we're using on a site with jquery_update with the patch for #2089697: JQuery update break media browser. N0 media elements are displayed in the media library tab.
Comment #27
aaron commentedCommitted to http://drupalcode.org/project/media.git/commit/34b1824.
Comment #29
berenddeboer commentedWorks on Chrome, doesn't work on FireFox 36.0.1.
Comment #30
berenddeboer commentedThis patch makes no sense whatsoever. It replaces perfectly fine jQuery with plain javascript. No logic change whatsoever!
Why was this actually committed?
Comment #31
berenddeboer commentedAnd I finally see #24, OK, that makes more sense, and I suppose to keep compatibility between jQuery 1.4 and newer versions just plain javascript is used.
Comment #32
berenddeboer commentedFalse alarm for FireFox, due to .js file being dynamically served, wasn't reloaded even with Ctrl+R to reload the page.