Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Without the permission to edit media, I get a javascript error
editButton.attr("href") is undefined
Line 70
Seems the javascript is trying todo some things with the editButton but that button does not display due to my permissions
see attached patch
Comment | File | Size | Author |
---|---|---|---|
#4 | media-no-editor-button-fix-reroll.patch | 2.02 KB | raytiley |
media-no-editor-button-fix.patch | 2.02 KB | dgtlmoon | |
Comments
Comment #1
dgtlmoon CreditAttribution: dgtlmoon commentedMore accurately, when the user does not have the permission to edit files (which edit media depends on)
Comment #2
dddave CreditAttribution: dddave commentedComment #3
Dave ReidThis seems to be good. Could you possibly re-roll this with the Drupal coding standards around the if () calls in the JS?
Comment #4
raytiley CreditAttribution: raytiley commentedRerolled patch to include davereids request. Patch still applies cleanly. Did do any other testin.
Comment #5
raytiley CreditAttribution: raytiley commentedOoops... meant did not do any other tests above.
Comment #6
Dave ReidThanks raytiley and dgtlmoon! Committed #4 to Git!
http://drupalcode.org/project/media.git/commit/a7284f4