I have experienced slow transitions between images in the colorbox which pops up from my Media Gallery.
On the colorbox project page it is stated that it is possible to preload images. Is this being done?
Or how can I enable such a feature in my Media Galleries?

Comments

NancyDru’s picture

MG was fine until I installed the Colorbox library - now it is so slow, MG isn't worth using. That'll teach me to read the error logs.

NancyDru’s picture

Priority: Normal » Major

I was just prompted (Status report) to put in the latest Colorbox plugin (1.3.17.2), so I did (sites/all/libraries/colorbox). The gallery show the images, but when I click on one, the pop up box never (more than 5 minutes) shows the image.

Nothing in Watchdog (dblog) and nothing in Apache error log.

mcfilms’s picture

I can confirm that I am experiencing this issue as well. Is downgrading the version of Colorbox the best solution?

NancyDru’s picture

1.3.18 - no change

NancyDru’s picture

Version: 7.x-1.0-beta3 » 7.x-1.0-beta7
NancyDru’s picture

Perhaps this is the problem. I renamed the Colorbox library so it could not be found. When I click on an image, the log shows "page not found" and gives the "Location" as http://lcn/sites/all/libraries/colorbox/colorbox/jquery.colorbox-min.js?v=1.3.9. I have the latest Colorbox - 1.3.18 and don't see how to download 1.3.9.

NancyDru’s picture

Is this part of the problem?

function media_gallery_library() {
  $library_path = variable_get('media_gallery_library_path', 'sites/all/libraries');
  $stylesheet = variable_get('media_gallery_colorbox_stylesheet', 'example1');
  $libraries['colorbox'] = array(
    'title' => 'Colorbox',
    'website' => 'http://colorpowered.com/colorbox/',
    'version' => '1.3.9',
    'js' => array(
      $library_path . '/colorbox/colorbox/jquery.colorbox-min.js' => array(),
    ),
    'css' => array(
      $library_path . '/colorbox/' . $stylesheet . '/colorbox.css' => array(
        'type' => 'file',
        'media' => 'screen',
      ),
    ),
  );
  return $libraries;
}

It looks like the version is hard-coded.

I changed that line and at least an image will show up in the box after I click on the next arrow - but it takes almost a minute (this is a local site on my Windoze PC). It does not create a slideshow, so it is entirely worthless.

wipeout_dude’s picture

Just subscribing.. I get random errors with no library (http://drupal.org/node/1312948) and when I install a library images don't show when clicked..

Seems to be a lot of issues in the queue on this module.. Pity because its the best (or only) real gallery solution for D7..

wipeout_dude’s picture

Duplicate post..

mcfilms’s picture

The error I get on my "white screen of colorbox death" is:

Error: settings is undefined
Source File: http://site.org/sites/all/libraries/colorbox/colorbox/jquery.colorbox.js...
Line: 177

Line 177 starts like this:

if (settings.slideshow && $related[1]) {
			start = function () {
				$slideshow
					.text(settings.slideshowStop)
					.unbind(click)
					.bind(event_complete, function () {
						if (index < $related.length - 1 || settings.loop) {
							timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
						}
					})
					.bind(event_load, function () {
						clearTimeout(timeOut);
					})
					.one(click + ' ' + event_cleanup, stop);
				$box.removeClass(className + "off").addClass(className + "on");
				timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
			};
			

Maybe we are having two different issues.

lsolesen’s picture

Status: Postponed (maintainer needs more info) » Active
Moloc’s picture

Status: Active » Postponed (maintainer needs more info)

Thread starter / Post 0:
Colorbox is able to preload images, that is true. The media_gallery settings enable this feature. The problem is, that media_gallery does not only serve the image, it also delivers the description, license images, link to the media-page and so on. To display all these informations, media_gallery produces html-content. Colorbox checks, what type of content will be displayed. As there is html-content instead of the image, colorbox can not preload it and therefore colorbox can not use the preload feature.

Post #1 to #7
The hardcoded verison-information is not checked in the code. Therefore you don't need to change it, because it should not have any effect. (If this is wrong, you can correct me.)
Can you provide more information?
If you enter the direct URL of the "media" (same link as the detail page - you just need to replace "detail" to "lightbox" in the url), which should be displayed in the colorbox, does it load correct / fast?
Check your html-source. Is colorbox loaded only once? Or is is loaded more than once (usually it is in the head-part of the html-code).
Do you get javascript errors?

Post #8 to #9 is already solved in the referenced link in #8

Post #10
What version of colorbox are you using?
Can you provide the same information as requested for post #1 to #7?

mcfilms’s picture

@Moloc -- Sorry I needed to get that site done. I ended up dumping Media Gallery and using a tutorial I found that used Views to create a Gallery with thumbnails that linked to lightbox versions.

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)
Moloc’s picture

Status: Postponed (maintainer needs more info) » Fixed

@lsolesen: There are not much information here to say, that it is a duplicate. I'm not sure.

@NancyDru: If this is still an error for you and you have more information please reopen (or better: create a new issue).

I think the question from the thread starter is answered in #12. Therefore i close this issue (there are no more responses to our questions).

Status: Fixed » Closed (fixed)

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

musubi’s picture

Status: Closed (fixed) » Needs work

I would very much like to see this fixed!

ivnish’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)