Fatal error: Call to undefined function media_access() in C:\wamp\www\Core7\sites\masstapp.edc.org\modules\contrib\media_youtube\includes\MediaYouTubeBrowser.inc on line 19

I get this when I click the "Select" button in the content type.

Media_access() was removed in #2153459: Remove media_access().

Comments

nancydru’s picture

Media 7.x-2.0-alpha3+39-dev
Media: YouTube 7.x-2.0-rc4
File entity 7.x-2.0-alpha3+10-dev

nancydru’s picture

class MediaYouTubeBrowser extends MediaBrowserPlugin {
  /**
   * Implements MediaBrowserPluginInterface::access().
   */
  public function access($account = NULL) {
    // @TODO: media_access() is a wrapper for file_entity_access(). Switch to the
    // new function when Media 1.x is deprecated.
    return file_entity_access('create', $account);
//    return media_access('create', $account);
  }

The @TODO explains it all.

Ralf Eisler’s picture

Same issue here with:

Media 7.x-2.0-alpha3+38-dev
Media: YouTube 7.x-2.0-rc4
File entity 7.x-2.0-alpha3+10-dev

nancydru’s picture

The same error is on line 313 of media_youtube.module.

hongpong’s picture

Unfortunately also getting this. Wish I had the media-fu to help fix.

nancydru’s picture

The fixes are trivial: just change the function name.

nancydru’s picture

Issue summary: View changes
nancydru’s picture

I just pulled the latest code from Git and there is a change to fix this, even though this issue is not marked as fixed.

themusician’s picture

Changing the function name in those two places does eradicate the error. All normal abilities of the Media YouTube module appear to work still.

Do we need a patch generated to move this to an RTBC status?

devin carlson’s picture

Status: Active » Closed (duplicate)
Related issues: +#1823376: media_access() is deceprated and will be removed