I just spent the whole day trouble shooting one problem in a custom theme. Galleria would throw a "Theme CSS could not load" 95% of the time when my site was viewed on a mobile device. The weird part is that the other 5% of the time was almost completely random.

Long story short, go into your custom theme's js and min.js and remove the CSS reference (ex. css: 'galleria.classic2.css',). Then go into your Drupal theme and add that CSS file to your themes .info file. BAM! everything solved.

I'm going to file this as a bug report, but it might also be a feature request and a documentation issue. Please correct accordingly.

Comments

kroimon’s picture

Title: Getting "Theme CSS could not load" on Mobile » Add option to statically link the theme CSS
Category: bug » feature
Priority: Normal » Minor

Seems like the dynamic CSS loading mechanism in Galleria is a little buggy on your mobile.
We might add an option to statically add the CSS to the page instead of relying on the dynamic way, but it's not high-priority at the moment.
I changed the title and category of this issue accordingly as a todo item...

willli’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta3
Assigned: Unassigned » willli

Animelion, your workaround breaks the true fullscreen option at my site. Can you confirm this?

willli’s picture

Assigned: willli » Unassigned
bryancasler’s picture

I can't because the theme I'm using doesn't have a full screen option.

Anonymous’s picture

+1 for the idea of adding some documentation for this. I could not load this module in Chrome at all, and spent a lot of time trying to figure out what was going on.

How I got this to work in all browsers:

Remove the 'css' line in:
sites/all/libraries/galleria/themes/classic/galleria.classic.js

Remove the 'css: xxxxx,' property in:
sites/all/libraries/galleria/themes/classic/galleria.classic.min.js

Copy the file
sites/all/libraries/galleria/themes/classic/galleria.classic.css to your theme. For my theme, I put this into the 'css' folder within my theme.

Put a reference to the galleria.classic.css file in your theme.info file:
stylesheets[all][] = css/galleria.classic.css

Please make a note on the project homepage or in the README file that if your CSS file refuses to load you should manually put the file into your theme. It will save someone a lot of time debugging!

Anonymous’s picture

Priority: Minor » Major

Setting this to major because both beta and dev versions do not work out of the box without editing code. If code editing is not done, the site will appear broken to many users.

Anonymous’s picture

Looks like the CSS references these files which should also be moved to your theme/css/ folder (or updated in galleria.classic.css) -

classic-loader.gif
classic.map.png
howdytom’s picture

Ryan Weal, Thank you! I was looking for a solution too and stumbled upon your comment.

This module doesn't work out of the box. It's been over 1 year and the CSS file still refuses to load on IE. I hope to see a fix soon.

miguel garvie’s picture

Hello I'm having the same issue. Ryan what do you mean by "sites/all/libraries/galleria/themes/classic/galleria.classic.css to your theme. For my theme, I put this into the 'css' folder within my theme."

I am using the classic theme..