JS "Fatal error" is raised on 1st load in IE7-8

  • Problem
  • Updated 3 years ago
When I'm opening the page with latest Galleria version (e.g. Galleria homepage with demo) with IE7 or IE8 I constantly get JS following error:
"Line: 3394
Error: Fatal error: Theme at /media/galleria/src/themes/classic/galleria.classic.js could not load, check theme path."

In IE8 (both standard and compatibility modes), after refusing to debug script and closing this dialog script works normally, but in IE7 it completely fails to start.

It happens every time when gallery script and images are not cached yet (by first visit and on full page reload by Ctrl+F5).

I consider this issue as very critical for the pre-release product.
Photo of streltsyn111S

streltsyn111

  • 4 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 17
Photo of BenB

Ben

  • 3 Posts
  • 0 Reply Likes
For those who are using the gallery on a page that's also using Typekit, I was able to solve the problem by placing the code for loading the Galleria theme higher in the head. Libraries like Typekit require lots of downloading, so I think just in general a good way to approach solving this problem is try to load all of the Galleria resources as early on as possible.
Photo of mikegM

mikeg

  • 10 Posts
  • 0 Reply Likes
I think I figured out what I did wrong and it's been working for me without errors since then. I'm using IE8 which I suppose is the most common browser at this time so like it or not, it gets my highest attention.

As I mentioned before, I added the following code to the header section of each of my html files that load each separate gallery which is just a re-write of the file "original.html" from the Classic gallery download:

< LINK REL=STYLESHEET TYPE="text/css" HREF="galleria.classic.css" >
< script src="../../galleria-1.2.2.min.js" >< /script >

then I added the following script in the header also in an 'attemp' to pre-load the galleria (I say 'attempt' because I'm not sure if I did it correctly but it seems to have worked at least for IE8):

< script >
// Load the classic theme
Galleria.loadTheme('galleria.classic.min.js');

// Initialize Galleria
$('#galleria').galleria();
< /script >

Then the mistake I overlooked - and the reason why I still had errors after that - was because I missed loading some thumbnail images when I actually created the div in the body section of the same html file. For example, for every single picture there should be a corresponding thumbnail image:

< div id="galleria" >
< a href="http://www.hawaiivacationsreviews.com..." >
< img title="nice title"
alt="nice description< br >< br >"
src="http://www.hawaiivacationsreviews.com..." width="105" height="70" >
< /a >
etc, etc...
< /div >

My only other advice is to compress the thumbnails as much as possible - currently mine are down to 1k each and although they look terrible, I don't see any errors. But I haven't tested it yet on other browsers.

If anyone gets an error on this site - hawaiivacationsreviews.com - please reply to this thread and let me know. Look at "Magic Island" as this has the highest number of pictures - about 50 currently. Thanks.
Photo of Alejandro Rubalcava

Alejandro Rubalcava

  • 5 Posts
  • 0 Reply Likes
Did this NOT work with IE 7?
Photo of marer13M

marer13

  • 30 Posts
  • 0 Reply Likes
I've just looked at the code of your "Magic Island" page and there IS NO link or script code in the header as you mention here.......
Photo of mikegM

mikeg

  • 10 Posts
  • 0 Reply Likes
marer13 - dude, you need to right click on the black area of the slide show on that page to see the correct code. That's because the html file which creates the slideshow is INSIDE AN IFRAME on that page. I just right clicked (on the black area of the slide show) and viewed source code and I see both the LINK statement and the script which pre-loads the galleria along with the comments explaining this. By the way, I'm currently making adjustments so it might look funny temporarily but I still don't see any errors when loading the webpage. I was just trying to be helpful here and was hoping that if someone noticed an error they could alert me to it.
Photo of grknsngnG

grknsngn

  • 1 Post
  • 0 Reply Likes
I also have the problem on http://www.kerstindittmar.ch when you go to "Portfolio", sometimes it isn't loaded but after a refresh it works (not only with IE but also Firefox and Google Chrome), any hints?
Photo of Dave

Dave

  • 1 Post
  • 0 Reply Likes
HI

Yep having the same problem as above. it; pretty dreadful I must say. Sometimes it works, sometimes it doesn't in IE7 and 8.It always gives the same fatal error, 'could not load, check theme path'. Whats going on and is there any fix?
Photo of arlingtonradonA

arlingtonradon

  • 6 Posts
  • 0 Reply Likes
Same problem here.....
Photo of David

David, Author

  • 1221 Posts
  • 143 Reply Likes
Everyone who is having this problem: Please download the latest version, and at least make sure you are using 1.2.4 or later before posting here. 99% of the IE problems described here are fixed in 1.2.4

http://galleria.aino.se/download
Photo of Alejandro Rubalcava

Alejandro Rubalcava

  • 5 Posts
  • 0 Reply Likes
I cannot seem to make it work in IE 7
It seems to work fine in everything else but IE7. Any ideas? I am running 1.2.4
Photo of arlingtonradonA

arlingtonradon

  • 6 Posts
  • 0 Reply Likes
I am running 1.2.4 I did reduce the size of my photos and this seems to have helped.
Photo of ebop

ebop

  • 1 Post
  • 0 Reply Likes
I am using Galleria version 1.2.4. I am seeing this problem on Chrome, Firefox and IE8. I have 23 images with an average file size around 250 kB. I've tried all of the fixes regarding placing scripts in the head to pre-load. I don't feel comfortable with javascript/jquery to mess around in the thick of it.
This is a fatal error, for sure.
Photo of David

David, Author

  • 1221 Posts
  • 143 Reply Likes
@ebop: do you have a link?
Photo of theturninggate

theturninggate

  • 6 Posts
  • 0 Reply Likes
I am also having some issues related to IE, and using the latest 1.2.5a2 build. Things look good in IE9, but my image alignment, thumbnails and info button get thrown off in IE7 or when using compatibility view in IE8 or IE9.

Any help would be greatly appreciated.

I have a test gallery posted here:
http://matthewcampagna.com/galleria/
Photo of Gerard Gauthier

Gerard Gauthier

  • 1 Post
  • 0 Reply Likes
I am terribly sad to report this, but I would simply say Galleria as nice as it appears is too much pain and I will drop it.
My first and final attempts to use it lays here:
http://ongola.free.fr/Japan.2011-05
Anyone can always see the code why it does not work with all my friends visiting it, things which do not happen with galleries created from XnView for example. It's a 250-image gallery with small thumbnails. I tried to do everything possible to preload the theme etc and still because server in France is a little bit sluggish and my test viewers for some are in Japan, it simply chokes.
And life is too short to spend days and days on what a so called 'solution' turns out in just another pain... I like fancy things but reliability is key and Galleria probably missed something.
Photo of daneD

dane

  • 1 Post
  • 0 Reply Likes
Hi THere,

I have recently launched my site with the miniml theme version 1.2.4 and have feedback from one user with windows 64 bit using IE9 and FF5 experiencing the error: 'Fatal error: Theme at storage/galleria/themes/miniml/galleria.miniml.min.js could not load, check theme path.'

I have tested with IE8, chrome and safari all working OK.

my site address is www.oshanassyprojects.com

Any help would be great!
Photo of Peter Walker

Peter Walker

  • 1 Post
  • 0 Reply Likes
OPTIMISATION USING .HTACCESS

This will dramatically improve image loading times, and allow you to add more images into your gallery without getting the error. It will occur still if you have too many, but this helps:

Make sure you are using an apache server (wont work on windows etc) and that your host allows you to modify apache settings using htaccess.

1. Create a file called htaccess.txt in the root of your site.
2. Add this code:

# Image and Flash content Caching for One Month

Header set Cache-Control "max-age=2592000"

3. Upload to the root of your website, and rename htaccess.txt to .htaccess
Photo of olesoloO

olesolo

  • 1 Post
  • 0 Reply Likes
drupal / views slideshow galleria
update galleria script from 1.2 to 1.2.5 fix a problem
Photo of azgswebA

azgsweb

  • 3 Posts
  • 0 Reply Likes
I'm having a problem where the thumbnails don't load in Firefox and nothing loads in IE (no pics). Works fine in Chrome. I'm in Drupal 7.10, using Views Slideshow: Galleria and Galleria 1.2.6...

Thoughts?
Photo of azgswebA

azgsweb

  • 3 Posts
  • 0 Reply Likes
OK... seems to be related to the theme used in Drupal. I'm using AT Commerce and have this issue. When I switch to Bartik, I have no problems in any browser. Any thoughts?
Photo of malaika1818M

malaika1818

  • 5 Posts
  • 0 Reply Likes
What is Bartik and how did you make the switch. I'd love to fix the problem of the Bartik thing resolves the issue.

Forgive me if Bartik is not a fix but something else. I'm a bit new to this.

Thanks
Photo of jannie.2strokeJ

jannie.2stroke

  • 3 Posts
  • 0 Reply Likes
Hi

I'm getting the same on IE7/8 and chrome. It only happens when I exceed a certain amount of images. I've read that it has something to do with the theme loading before all the images do that causes it.

Is there a way to set a delay or somehow get the theme to only load once all the images have loaded?

thanks in advance
http://www.myburghduplessis.com/portf...
Photo of RachelR

Rachel

  • 1 Post
  • 0 Reply Likes
I am getting this problem with IE8 even with a small number of images. This is not good! I've included a link to the css in the head section and my files are low res. What else can I try? I've spent HOURS trying to get this to work.
Photo of jannie.2strokeJ

jannie.2stroke

  • 3 Posts
  • 0 Reply Likes
I've got a fix for this but I don't know how to post a script tag and have it display on this page. just email me at jannie.2stroke@gmail.com and I'll give a fix for this. It took a while to fix but was actually pretty simple.
Photo of jannie.2strokeJ

jannie.2stroke

  • 3 Posts
  • 0 Reply Likes
I've got a fix for this but I don't know how to post a script tag and have it display on this page. just email me at jannie.2stroke@gmail.com and I'll give a fix for this. It took a while to fix but was actually pretty simple.
Photo of estenat

estenat

  • 1 Post
  • 0 Reply Likes
Hi guys, considering your suggestions I set a longer timeout on function Galleria.loadTheme. This solved the Fatal Error raised on first load on IE. My gallery holds 40 pictures, each one is 450px × 298px (scaled to 840px × 556px)

The modified source code is galleria-1.2.8.js and the patch I apply is the following:

$ cat galleria-1.2.8-IEtimeout.patch
--- galleria/galleria-1.2.8.js 2012-10-15 20:56:08.000000000 +0200
+++ new_galleria/galleria-1.2.8.js 2012-10-15 20:54:02.000000000 +0200
@@ -5100,8 +5100,8 @@
var loaded = false,
length = _galleries.length,
err = window.setTimeout( function() {
- Galleria.raise( "Theme at " + src + " could not load, check theme path.", true );
- }, 5000 );
+ Galleria.raise( "Theme at " + src + " could not load, check theme path...", true );
+ }, 30000 );

// first clear the current theme, if exists
Galleria.theme = undef;