I read similar issues thread http://drupal.org/node/569936 and http://drupal.org/node/496048 but none could solve my problem. I have both lightbox2 6.x-1.11 and i18n installed.
My image on the french version of the site cannot be displayed using lightbox2. They are appended with the prefix 'fr', so the image path becomes /fr/image.png and cannot be found.
Any suggestions ?

CommentFileSizeAuthor
#2 10-11-2010 21-24-39-lightbox.png435.34 KBpietrocap

Comments

davidkebo’s picture

Assigned: davidkebo » Unassigned
Priority: Critical » Normal

Anybody willing to help me out ? Any suggestion is greatly appreciated.

pietrocap’s picture

Version: 6.x-1.11 » 6.x-1.9
StatusFileSize
new435.34 KB

I am having the same problem with lightbox2, i18n and path prefix with language fallback, and the image module because of the links "original", "thumbnail", "preview" on the image nodes including the language prefix (http://localhost/girotonno/it/sites/default/files/images/DSC_0051.jpg). The language prefix should be stripped from the URL but it isn't.

See attached screnshot.

joseph.olstad’s picture

Title: Link to image doesn't work with path prefix with i18n » ajax call needs path prefix with i18n
Version: 6.x-1.9 » 7.x-1.x-dev
Issue summary: View changes

here is the solution:

lightbox.js

lines 1163:

diff --git a/js/lightbox.js b/js/lightbox.js
index 5c9aa64..061cfd6 100644
--- a/js/lightbox.js
+++ b/js/lightbox.js
@@ -1162,8 +1162,10 @@ Lightbox = {

   filterXSS: function(str, allowed_tags) {
     var output = "";
+    var prefix = Drupal.settings.pathPrefix;
+    if (!prefix) prefix = '';
     $.ajax({
-      url: Drupal.settings.basePath + '?q=system/lightbox2/filter-xss',
+      url: Drupal.settings.basePath + prefix + '?q=system/lightbox2/filter-xss',
       data: {
         'string' : str,
         'allowed_tags' : allowed_tags

  • joseph.olstad committed 5cb9314 on 7.x-1.x
    Issue #958730 by joseph.olstad: ajax call needs path prefix with i18n
    

  • joseph.olstad authored d561cdc on 7.x-2.x
    Issue #958730 by joseph.olstad: ajax call needs path prefix with i18n
    
joseph.olstad’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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