Hi

I have installed galleria on drupal 7.2

My site is here http://www.flatsinbraunton.co.uk/lowercampscott/fuchsia-cottage.html

As you can see, the theme info doesn't eppear to be being picked up, and there are a couple of javascript errors:

Galleria is not defined

and

jQuery(".galleria-content", context).galleria is not a function

Not sure how to fix this, any advice and guidance would be great.

Matt

CommentFileSizeAuthor
#11 library_glob.patch1.17 KBkroimon
#2 gallaria-issues.jpg119.74 KBmattys
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

s_leu’s picture

The project was updated minutes ago.
Please recheck / update.

Did you download the library as described in the README.txt? Follow the instructions in the README.txt and it should work.

Please post all Javascript errors in full detail. A screenshot would be nice as well.

mattys’s picture

FileSize
119.74 KB

Hi

Thanks for getting back to me, appreciated.

I am using Drupal 7, i can see a new release for D6, but not D7, last release was May 29, please correct me if wrong, so, am using latest version.

Yes, followed install instructions in readme, uploaded libraries, and, looking at code are being sourced properly.

This is link to problem page http://www.flatsinbraunton.co.uk/lowercampscott/fuchsia-cottage.html

Screenshot attached, this includes galleria images as they are currently being displayed, you will notice the space, this corresponds to size of main, large image, which isn't being displayed, on this screenshot you can also se the errors.

If any further info is required, please let me know.

Matt

miro_dietiker’s picture

the release takes some time to show up.
changes where pushed to drupal.org at the time of writing.

mattys’s picture

so, even though still shows may 29 on this page http://drupal.org/project/galleria, if i download zip it will be todays latest version?

miro_dietiker’s picture

So surely not. It will be the version written beside the file.

You can always use git to checkout the latest version.
http://drupal.org/project/galleria/git-instructions

mattys’s picture

I have no idea what git is and what it does, will have to look into this

although a little confused, from what i gather, todays latest version of D7 Galleria (june 9th) hasn't been uploaded to http://drupal.org/project/galleria yet.

i guess i will have to wait for this, download, install and see if that fixes issues

mattys’s picture

i have uploaded latest version of galleria for drupal 7

still having the same problems

looks like scripts aren't beign picked up

this source does feature in header:

galleria-1.2.3.min.js?lmkerq

but when i look at file via ftp it is actually:

galleria-1.2.4.min.js

Not quite why it is doing this

mattys’s picture

I have made some progress...

the issue is that the theme or scripts are NOT being picked so display/presentation the pics as galleria is broken

as per above, it looked like the incorrect javascipt file was/is being sourced (a new galleria libraray was relased on the 8th june, a new D7version of module released today, but doesn't look like synchronised), galleria-1.2.3.min.js, when galleria-1.2.4.min.js should be being sourced

to test this I put ref to galleria-1.2.4.min.js in code of template file html.tpl.php, the result is progress, http://www.flatsinbraunton.co.uk/lowercampscott/fuchsia-cottage.html,

I also forgot to set the image field 'unlimited number of values', which in have now, and now works (and which isn't mentioned in nay documentation, as far as I can see)

Obviously this is not the solution and the issue of incorrect javascript file being sourced needs attention.

anyone any ideas how this might be sorted? or is it just peculiar to my installattion? (i can't see why it would be)

inTOOLS’s picture

Yes, there is a previous version of the JavaScript library in the galleria.module file in line 344:

      // include essential files from /libraries/galleria
      $js[] = $libpath . '/galleria-1.2.3.min.js';

I just corrected it in my installation to have

      // include essential files from /libraries/galleria
      $js[] = $libpath . '/galleria-1.2.4.min.js';

and now everything seems to be fine.

kroimon’s picture

Title: Theme and javascript broken » Support for Galleria 1.2.4
Component: Miscellaneous » Code

Yepp, the galleria Javascript file should be determined dynamically.
Tip: use a glob() call for that and for the theme file search.

kroimon’s picture

FileSize
1.17 KB

Here's a patch that should find any version of the library and uses the most recent one if more than one is found.

miro_dietiker’s picture

Globbing is a pretty expensive operation.
The library version shoul be determined once and then reused without globbing on every site request.
Is there no standard from libraries to support such cases?

If no, we could use a variable and glob for the file only if the file is not found (according to the var) or var is empty.
(variable_set, variable_get)

miro_dietiker’s picture

Status: Active » Needs work
miro_dietiker’s picture

Title: Support for Galleria 1.2.4 » Support Galleria 1.2.4 and future versions
s_leu’s picture

Status: Needs work » Fixed

Thanks for the patch kroimon. The change is now committed, should be in the downloadable dev version within a few hours.

Status: Fixed » Closed (fixed)

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