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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dgtlmoon’s picture

More accurately, when the user does not have the permission to edit files (which edit media depends on)

dddave’s picture

Status: Active » Needs review
Dave Reid’s picture

This seems to be good. Could you possibly re-roll this with the Drupal coding standards around the if () calls in the JS?

raytiley’s picture

Rerolled patch to include davereids request. Patch still applies cleanly. Did do any other testin.

raytiley’s picture

Ooops... meant did not do any other tests above.

Dave Reid’s picture

Status: Needs review » Fixed

Thanks raytiley and dgtlmoon! Committed #4 to Git!
http://drupalcode.org/project/media.git/commit/a7284f4

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.