I auto-generate a thumbnail by ImagePicker, and the display the full size by Lightbox.
Here is the source code of the generated HTML file:

<a href="/drupal/sites/default/uploaded_files/imagepicker/1/screenshot_2012-03-06_16-42-14.png" rel="lightbox"><img alt="Image" class="imgp_img" height="74" src="/drupal/sites/default/uploaded_files/imagepicker/1/thumbs\screenshot_2012-03-06_16-42-14.png" width="200"></a>

As you can see, the path includes "thumbs\" instead of "thumbs/".

Result: Firefox doesn't find the thumbnail file. (But Chrome auto-corrects this path and finds it).

Please review this bug.

Comments

franksweb’s picture

Subscribe

hutch’s picture

Status: Active » Postponed (maintainer needs more info)

Is this running Drupal on a Windows machine?

franksweb’s picture

Status: Postponed (maintainer needs more info) » Active

yup. This is running Drupal on a Windows machine.

And another thing of Chrome is that it removes the div (

) around the DESC (description)!
hutch’s picture

Could you please edit imagepicker.module, line 1074
replace

  if ($found) {
    if ($suffix) {
      if (imagepicker_variable_get('imagepicker_use_full_url', 0) || variable_get('file_default_scheme', 'public') == 'private') {
        if (module_exists('image') && imagepicker_variable_get('imagepicker_image_enable', 0) && $preset && $suffix == IMAGEPICKER_THUMBS_DIR) {
          $imgpath = image_style_url('__PRESET__', IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . DIRECTORY_SEPARATOR . imagepicker_get_userpath($userdir) . $suffix . DIRECTORY_SEPARATOR . $img_name);
        }
        else {
          $imgpath = file_create_url(IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . DIRECTORY_SEPARATOR . imagepicker_get_userpath($userdir) . $suffix . DIRECTORY_SEPARATOR . $img_name);
        }
      }
      else {
        if (module_exists('image') && imagepicker_variable_get('imagepicker_image_enable', 0) && $preset && $suffix == IMAGEPICKER_THUMBS_DIR) {
          $imgpath = image_style_url('__PRESET__', IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . DIRECTORY_SEPARATOR . imagepicker_get_userpath($userdir) . $suffix . DIRECTORY_SEPARATOR . $img_name);
        }
        else {
          $imgpath = imagepicker_get_path(TRUE, $userdir) . $suffix . DIRECTORY_SEPARATOR . $img_name;
        }
      }
    }
    else {
      if (imagepicker_variable_get('imagepicker_use_full_url', 0) || variable_get('file_default_scheme', 'public') == 'private') {
        if (module_exists('image') && imagepicker_variable_get('imagepicker_image_enable', 0) && $preset) {
          $imgpath = image_style_url('__PRESET__', IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . DIRECTORY_SEPARATOR . imagepicker_get_userpath($userdir) . $img_name);
        }
        else {
          $imgpath = file_create_url(IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . DIRECTORY_SEPARATOR . imagepicker_get_userpath($userdir) . $img_name);
        }
      }
      else {
        if (module_exists('image') && imagepicker_variable_get('imagepicker_image_enable', 0) && $preset) {
          $imgpath = image_style_url('__PRESET__', IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . DIRECTORY_SEPARATOR . imagepicker_get_userpath($userdir) . $img_name);
        }
        else {
          $imgpath = imagepicker_get_path(TRUE, $userdir) . $img_name;
        }
      }
    }
  }

with

  if ($found) {
    if ($suffix) {
      if (imagepicker_variable_get('imagepicker_use_full_url', 0) || variable_get('file_default_scheme', 'public') == 'private') {
        if (module_exists('image') && imagepicker_variable_get('imagepicker_image_enable', 0) && $preset && $suffix == IMAGEPICKER_THUMBS_DIR) {
          $imgpath = image_style_url('__PRESET__', IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . '/' . imagepicker_get_userpath($userdir) . $suffix . '/' . $img_name);
        }
        else {
          $imgpath = file_create_url(IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . '/' . imagepicker_get_userpath($userdir) . $suffix . '/' . $img_name);
        }
      }
      else {
        if (module_exists('image') && imagepicker_variable_get('imagepicker_image_enable', 0) && $preset && $suffix == IMAGEPICKER_THUMBS_DIR) {
          $imgpath = image_style_url('__PRESET__', IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . '/' . imagepicker_get_userpath($userdir) . $suffix . '/' . $img_name);
        }
        else {
          $imgpath = imagepicker_get_path(TRUE, $userdir) . $suffix . '/' . $img_name;
        }
      }
    }
    else {
      if (imagepicker_variable_get('imagepicker_use_full_url', 0) || variable_get('file_default_scheme', 'public') == 'private') {
        if (module_exists('image') && imagepicker_variable_get('imagepicker_image_enable', 0) && $preset) {
          $imgpath = image_style_url('__PRESET__', IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . '/' . imagepicker_get_userpath($userdir) . $img_name);
        }
        else {
          $imgpath = file_create_url(IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . '/' . imagepicker_get_userpath($userdir) . $img_name);
        }
      }
      else {
        if (module_exists('image') && imagepicker_variable_get('imagepicker_image_enable', 0) && $preset) {
          $imgpath = image_style_url('__PRESET__', IMAGEPICKER_FILE_SCHEME . IMAGEPICKER_FILES_DIR . '/' . imagepicker_get_userpath($userdir) . $img_name);
        }
        else {
          $imgpath = imagepicker_get_path(TRUE, $userdir) . $img_name;
        }
      }
    }
  }

Please let the list know what happens ASAP

franksweb’s picture

Yup.
DIRECTORY_SEPARATOR changing in '/' worked.
Thnx!

hutch’s picture

Status: Active » Closed (fixed)

This has been commited to dev version.
Thanks for your help.

szakeetm’s picture

Thanks for the fix!

hutch’s picture

I've just commited another bug in theme to do with DIRECTORY_SEPARATOR