I'm getting the following Javascript error when trying to get this module to work. Error cocurs when trying to render a page view that uses Views Slideshow: Galleria


Uncaught Error: Fatal error: Theme at /sites/all/libraries/aino-galleria-cd07497/src/themes/classic/galleria.classic.js could not load, check theme path.   galleria.js:4612

Galleria.raise  galleria.js:4612
(anonymous function)    galleria.js:4441

I'm using:

  • Views 6.x-2.14
  • Views Slideshow 6.x-2.3
  • Views Slideshow: Galleria 6.x-1.x-dev and 6.x-1.0-beta3
  • jQuery Update 6.x-2.x-dev and 6.x-1.1

I also use multilingual system with Language negotiation set as "Path prefix with language fallback". I tried all other options too.
Can anyone help?

Comments

goofrider’s picture

OK I fixed it.

The offending Javascript code in the rendered page was:

<script type="text/javascript">
<!--//--><![CDATA[//><!--
Galleria.loadTheme("/sites/all/libraries/aino-galleria-cd07497/themes/classic/galleria.classic.js")
//--><!]]>
</script>

Since the location for the theme is correct. I decided to try adding my site's base URL in the front, so that Galleria.loadTheme() is called with a fully-qualified URL like http://foobar.com/sites/all/libraries/aino-galleria-cd07497/themes/classic/galleria.classic.js

In ./sites/all/modules/views_slideshow_galleria/themes/views_slideshow_galleria.theme.inc

 116     // No theme specified; we assume they're using a Drupal theme for styling.
 117     $settings['themeURL'] = FALSE;
 118   }
 119 
 120   if ($settings['themeURL'] && !isset($loaded_themes[$settings['themeURL']])) {
 121     drupal_add_js('Galleria.loadTheme("'. $settings['themeURL'] .'")', 'inline');
 122     $loaded_themes[$settings['themeURL']] = TRUE;
 123   }

Changed line 121 to:

 121     drupal_add_js('Galleria.loadTheme("'. $base_url . $settings['themeURL'] .'")', 'inline');

Now Galleria.loadTheme() executes correctly.

ainz’s picture

Thanks goofrider your post helped me figure out my issue although it was a little different.

Here's what worked for me:

http://drupal.org/node/877864#comment-5760420