First thank you for this module. It's exactly what I want to make a high-quality mixed video/image gallery that I've been striving for since D6.

That said, I'm having some issues making this a reality. I'm currently using the Media: YouTube and Media: Vimeo modules to embed videos from those sites on my site in a View. However, I cannot see any embedded video. I keep seeing an error message when I click to bring up the Colorbox "Request unsuccessful: error". My view is using a "Content: Video" type field with the following settings...

Formatter: Media Colorbox
File view mode: Preview
Colorbox view mode: Original

I'd love to provide more info to help track down this problem and make this module better. Has anyone had success embedding videos from either Vimeo or YouTube and if so, how?

Thanks in advance

Comments

nodecode’s picture

FYI I'm observing a set of 8 error messages in my site log each time I try to open the Colorbox with the embedded videos...

  1. Notice: Undefined index: access in _menu_translate() (line 792 of /my_site_root/includes/menu.inc)
  2. Notice: Undefined index: access in menu_get_item() (line 478 of /my_site_root/includes/menu.inc)
  3. Notice: Undefined index: access in menu_execute_active_handler() (line 513 of /my_site_root/includes/menu.inc)
  4. Access Denied: media_colorbox/128/media_original/und
  5. Notice: Undefined index: access in menu_local_tasks() (line 1921 of /my_site_root/includes/menu.inc)
  6. Notice: Undefined index: access in menu_tree_page_data() (line 1222 of /my_site_root/includes/menu.inc)
  7. Notice: Undefined index: access in menu_tree_page_data() (line 1255 of /my_site_root/includes/menu.inc)
  8. Notice: Undefined index: access in shortcut_preprocess_page() (line 650 of /my_site_root/modules/shortcut/shortcut.module)

The 'Location' that these errors pertain to are all the same: http://mysite.com/media_colorbox/128/media_original/und (where '128' is the node id). I should also mention that the preview thumbnails in the View (which i click to bring up the Colorbox) are generated just fine.

kmadel’s picture

This could be related to permissions. The link to open the colorbox will only allow access to non-private paths.

Also, I have gotten Media YouTube to work with this module (although there are some issues regarding the size of the colorbox that I am hoping to fix soon, although it still works). I have not tested it with the Media: Vimeo module.

I will post some example recipes for using this module with video in the next few weeks.

nodecode’s picture

Thanks for taking a look at this.

Please note that I'm only using a public file system and I only have a single superuser account on the site I'm developing, so if it's a permissions issue, by definition this would be some sort of bug.

I look forward to helping you debug and improve this module.

k3vin_nl’s picture

I'm having the same issue, also with a public file system, and only the admin account.

k3vin_nl’s picture

Ha! Found it!
I was missing the file_entity module!
I don't understand how I was able to enable to media colorbox module without file_entity module, but at least now it works!

mrpeanut’s picture

Having this same issue. I do have file_entity enabled. I'm getting "Request unsuccessful: Forbidden"

nodecode’s picture

I too have the file_entity module enabled so #5 is not a fix for me either.

@K3vin and @kmadel: You both say this is working for you right? Perhaps you could share the structures of your Views. Also what versions of "File Entity" and "Media: YouTube" are you running?

sashkernel’s picture

+1
"Request unsuccessful: Forbidden" - shows up for my image attachments.

sashkernel’s picture

#5 worked for me.
Were is my experimenting with this problem
Despite this File_entity being enabled, I still did not have this working until I uploaded file_entity-7.x-2.0-unstable3.
I had to mess around with file type settings and enable proper display.

Now, here is the fun part:
When I was playing around with image sizes in Media/File Types, I tried to set FILE VIEW MODE to "Colorbox" and got that error.
So I switched to another one, like Large or Original, and it worked.

Hope this will help to resolve your issues. I'll post back if I dig out anything else about this issue.

sashkernel’s picture

Was messing around with this thing all day. Implemented even custom sizes based on this topic: http://drupal.org/node/1026790

Eventually, I found out that this module messes up some of the views that display teasers for blog posts. I think it's actually File Entity that messes it up.

I have Entity installed and this is probably why I have File Entity enabled when I upload File Entity module. There is definitely something wrong there.

For now I back tracked, but still looking forward to using this module, so I'll post update on my experience later.

mrpeanut’s picture

I have file_entity-7.x-2.0-unstable3 installed, File view mode set to Preview, and Colorbox view mode set to Colorbox. It is working fine for me now. Thanks!

sashkernel’s picture

I managed to work around my issue and got images to work the way I wanted.
Ended up using Image field with Media Selector widget. Views and Panels helped me to do the rest. Media Selector was pretty much the only feature I want to keep, and luckily it was available in the Image Field.

kmadel’s picture

The File entity module includes a 'View files' permission. If this isn't checked for Anonymous users, then they will not be able to see the image in the Colorbox. This is probably not the best way to manage the permissions since it is't what is used for a file field based image. There is currently an open issue in File entity to add more permission control: Add a file entity access API

nodecode’s picture

Status: Active » Closed (works as designed)

Fantastic. I'm glad I asked what module versions everyone was using. I was incorrectly using the File Entity 7.x-1.x sub-module that was bundled with the Media 7.x-1.x module. I have since upgraded to the 7.x-2.x branch and all is well. The upgrade path from Media 7.x-1.x to 7.x-2.x is very confusing now since File Entity has become its own module and it's nearly impossible to disable the Media module if you have media fields already created. I suggest the following step-by-step instructions for anyone who needs to upgrade: http://drupal.org/node/1294498

bmanbeck’s picture

Great work. What's the status of the recipes? I'm stuck and I'm looking forward to them.

bmanbeck’s picture

Issue summary: View changes

forgot to close out quotations on a link

tom.camp’s picture

I found that adding the file url parameter to the access arguments in the media_colorbox_menu() function fixed this error for me.

/**
 * Implements hook_menu().
 */
function media_colorbox_menu() {
  $items['media_colorbox/%file/%/%'] = array(
    'title' => 'Colorbox',
    'page callback' => 'media_colorbox_callback',
    'page arguments' => array(1, 2, 3),
    'access callback' => 'file_entity_access',
    'access arguments' => array('view', 1),
    'type' => MENU_CALLBACK,
    'file' => 'media_colorbox.pages.inc',
  );
  return $items;
}

Previously it was:

/**
 * Implements hook_menu().
 */
function media_colorbox_menu() {
  $items['media_colorbox/%file/%/%'] = array(
    'title' => 'Colorbox',
    'page callback' => 'media_colorbox_callback',
    'page arguments' => array(1, 2, 3),
    'access callback' => 'file_entity_access',
    'access arguments' => array('view'),
    'type' => MENU_CALLBACK,
    'file' => 'media_colorbox.pages.inc',
  );
  return $items;
}

The file_entity_access() function takes the second argument as the File and this seems to correct the problem.

I think that this maintains the access integrity, but if not, let me know.

tc