Rating does not work, javascript problem ?

petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Wed, 2009-07-01 09:51

Hello,

I know there are some posts about rating problems but I could not find any asnwers over there.
I upgraded Gallery from 2.1 to 2.3 and was very happy to see that the rating function was working well.
After I installed Xtreme theme, the rating module did not work any more.
I tried everything : permissions, album prefs, uninstalled and reinstalled the rating module.
But nothing changes:

I can see the stars, the mouseover works, I can see the javascript link but nothing happens when I click.
And this problem is happening whatever theme I am on...

any idea how to get that back to work ?

-------------------
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Wed, 2009-07-01 17:53

Probably some conflict with the train wreck that x_treme theme is. Try Carbon, it has the same over all look, but is smaller and simpler
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Thu, 2009-07-02 02:04

Hi Nivekiam,

thank you for your answer,

I am not using x_treme anymore, too many bugs for 2.3. I think I will go for PGLightbox, there are a few bugs for 2.3 but I can manage.

The problem with the rating is that it is not working on ANY of my themes any more.
And it was before I installed X_treme.

If I have to uninstall x_treme, what should I delete in the modules ? Knowing that I already uninstalled and reinstalled the rating module.
In other words, what file did X_treme corrupt during the installation ?

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Thu, 2009-07-02 02:16

First switch to the Matrix theme. Does the ratings module work?

Can you post a link to your site?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Thu, 2009-07-02 03:38

Here is a link to a matrix theme :

http://www.coquille.org/gallery/cellpics/

and a link to PGlightbox :

http://www.coquille.org/gallery/reports/srilanka/blackandwhite/263.jpg.html

and to Hybrid

http://www.coquille.org/gallery/voyages/2007/china/dalian/

PG theme

http://www.coquille.org/gallery/friends/2003/patrick/01.jpg.html?g2_enterAlbum=0

there are so many themes installed on my gallery because I am changing the layout, so I installed all those to see which fits the best.
For the moment, it's PG lightbox... I just have this rating problem...

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Thu, 2009-07-02 05:00

Thanks for the links. Now I can see that yes, it's a javascript issue. Don't know how to fix it. If you install the Web Developer toolbar in Firefox you'll see that it's galleryAuthToken is not defined

Still not sure how to fix it or what's causing it as everything I look at in your install looks fine. But when comparing your Gallery with my Gallery and looking at the source of the page here's what mine looks like:

Quote:
gallery2/main.php?g2_view=rating.RatingCallback&g2_command=rate&g2_itemId=11&g2_rating=1&g2_authToken=__AUTHTOKEN__')

And here's what your's looks like:

Quote:
gallery/main.php?g2_view=rating.RatingCallback&g2_command=rate&g2_itemId=23718&g2_rating=2&g2_authToken=a6a1007882f2'

I'd just double check that your files are intact:
FAQ: How can I make sure that my installation files are all intact?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Thu, 2009-07-02 10:06

Thank you for the tip

I ran the system check and here are the result :

Gallery file integrity

1) Missing files 1453 :

all the missing files are the file from x-treme theme that should go (and have been put) in the module folders. I don't understand why they should be in the x-treme folder, here is a sample :

Quote:
....themes/x_treme/colorpacks/x_snow/images/rating/star_u_1.0.gif
themes/x_treme/colorpacks/x_snow/images/rating/star_u_noborder.gif
themes/x_treme/colorpacks/x_snow/tab_left.gif
themes/x_treme/colorpacks/x_snow/tab_left_on.gif
themes/x_treme/colorpacks/x_snow/tab_right.gif
themes/x_treme/colorpacks/x_snow/tab_right_on.gif
themes/x_treme/comment/templates/blocks/local/AddComment.tpl
themes/x_treme/comment/templates/local/AddComment.tpl
themes/x_treme/iconpacks/x_black-icons_gif/account_setting.gif
themes/x_treme/iconpacks/x_black-icons_gif/add_album.gif
themes/x_treme/iconpacks/x_black-icons_gif/add_cart.gif
themes/x_treme/iconpacks/x_black-icons_gif/add_comment.gif
themes/x_treme/icon......

I don't know if this is a bug and what I should do about it.

2) Old files :

I have more than 5000 old files :-) but I don't know how to delete them, I could not get the script to work. When I click on it, it gets me back to the updater and when I download it, it's just an html file....

NOTE : I have some info note at the top of the page :

Quote:
Notice: Undefined offset: 4 in ......./gallery/modules/core/classes/GalleryUtilities.class on line 1250

Notice: Undefined offset: 3 in ....../gallery/modules/core/classes/GalleryUtilities.class on line 1250

Notice: Undefined offset: 2 in ......./gallery/modules/core/classes/GalleryUtilities.class on line 1250

Notice: Undefined offset: 1 in ........../gallery/modules/core/classes/GalleryUtilities.class on line 1250

hope this info helps you help me :-)

What if the problem is a URL rewrite problem, could that be it ?

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Thu, 2009-07-02 13:21

There were no modified files?

Just to be sure, can you run the file integrity check again, this time copying the list of files into separate text files and attach them to another post? You might have to zip them to get them posted.

I don't think it's a URL Rewrite issue.

As for the script, that's something you need to run on the server. I'd have to run through it again myself to see exactly what it outputs, but I'm pretty sure you need SSH access to run it.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Fri, 2009-07-03 01:33

Yes there were modified files, 9 of them, (none of them about rating) I got the originals, published and now there is not mention of modified files.
But the problem is still the same...

Here are the text files. Missing and old files.

I think I don't have SSH access to my server, I might have to ask my hoster to do it then ? But how can I get hold of the script ?

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

AttachmentSize
Archive.zip28.55 KB
Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Fri, 2009-07-03 03:19

Please put Gallery into debug mode and let me know when it's done.

FAQ: How to set/use Gallery in debug mode?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Fri, 2009-07-03 10:37

it's done

(thank you Nivekiam, I appreciate your help...)

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Fri, 2009-07-03 15:37

I think I found it, didn't see this before:

Quote:
<div id="RatingImagePreload<br />
<b>Notice</b>: Undefined index: child in <b>/path/to/your/site/httpdocs/gallery/g2data/smarty/templates_c/%%2309797152/coquille/%%FB^FB5^FB5718DA%%RatingImagePreload.tpl.php</b> on line <b>4</b><br />
">

AHAH

Try clearing your template cache:
FAQ: How can I clear cached data?

Right now, it's not loading some crucial javascript that it needs to load.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Sat, 2009-07-04 10:36

Thanx for the tip but smth went wrong

Quote:
Successfully deleted page cache
Deleting dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/entity
Unable to remove directory /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/entity/1/9
Unable to remove directory /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/entity/1
Unable to remove directory /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/entity
Unable to recreate dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/entity
Deleting dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/module
Unable to remove directory /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/module
Unable to recreate dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/module
Deleting dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/theme
Unable to remove directory /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/theme
Unable to recreate dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/theme
Deleting dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/smarty/templates_c
Recreating dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/smarty/templates_c
Deleting dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/tmp
Recreating dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/tmp
Deleting dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/repository
Recreating dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/repository

I put the debug off, tried to rate....no change...

I just put the debug on again...

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Sat, 2009-07-04 13:25
Quote:
Unable to remove directory /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/entity/1/9
Unable to remove directory /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/entity/1
Unable to remove directory /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/entity
Unable to recreate dir: /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/cache/entity

Your permissions are not right.
FAQ: How can I fix the filesystem permissions of the Gallery storage folder?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Mon, 2009-07-06 06:28

Hello

sorry for my late repls

I had to ask my host to repair some permission, as it did not work and, so now I cleared the cache data.
I deleted template and cache files, all operation are successful.

but rating still not works...

:-(

I put the side back in debug mode

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Mon, 2009-07-06 19:27

Can you PM me login details so I can take a closer look? If you create a user account for me, please add them to the Site Admin group.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Tue, 2009-07-07 02:39

Got your PM, took a look and dug around. I didn't make many changes, tried uninstalling and reinstalling the ratings plugin.

I would try uninstalling, not just deactivating any and all plugins and themes you don't need or use.

I would also try uninstalling the PGLightBox theme, since that seems to be tossing tons of errors and the URL Rewrite plugin. Then just reinstall the URL Rewrite plugin and see if that improves things.

I didn't do that because it would be making major changes to your Gallery install. But let's narrow this problem down and rule out any non-necessary plugin. I would also uninstall:
Custom Styles
Color Packs
Lightbox
Statistics

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Tue, 2009-07-07 03:02

Ok thank you nivekiam,

I will do that and let you know

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Thu, 2009-07-09 08:29

I have uninstalled all themes and a few modules.

I get this error when I try to change the root album + all sub allbums to matrix theme

Quote:
Platform Error
An error has occurred while interacting with the platform.

The exact nature of the platform error is unknown. A common cause are insufficient file system permissions. This can happen if you or your webhost changed something in the file system, e.g. by restoring data from a backup.
Back to the Gallery

Error Detail -
Error (ERROR_PLATFORM_FAILURE) : /home/httpd/vhosts/coquille.org/httpdocs/gallery/g2data/locks/12085
in modules/core/classes/FlockLockSystem.class at line 72 (GalleryCoreApi::error)
in modules/core/classes/GalleryLockSystem.class at line 147 (FlockLockSystem::_acquireLock)
in modules/core/classes/helpers/GalleryLockHelper_simple.class at line 176 (GalleryLockSystem::acquireWriteLock)
in modules/core/classes/GalleryCoreApi.class at line 2291 (GalleryLockHelper_simple::acquireWriteLock)
in modules/core/ItemEditTheme.inc at line 82 (GalleryCoreApi::acquireWriteLock)
in modules/core/ItemEdit.inc at line 84 (ItemEditTheme::handleRequest)
in main.php at line 250 (ItemEditController::handleRequest)
in main.php at line 104
in main.php at line 88
System Information
Gallery version 2.3
PHP version 5.2.6 apache2handler
Webserver Apache/2.0.52 (CentOS)
Database mysql 5.0.68
Toolkits Thumbnail, SquareThumb, Gd
Operating system Linux commodus.metanet.ch 2.6.9-55.ELsmp #1 SMP Wed May 2 14:28:44 EDT 2007 i686
Browser Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; fr) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17

if I uncheck "+all sub-album" the album change its theme....
Is this another permission problem ?
I checked with my host to see if there where any script rewriting user login but he said that It's a gallery problem...

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Thu, 2009-07-09 13:02
Quote:
Is this another permission problem ?

Most likely, yes. Try changing to database locking instead of file locking. Go to Site Admin > General (should be first page) and on that page you can change to database locking.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
petri
petri's picture

Joined: 2005-12-15
Posts: 99
Posted: Fri, 2009-07-10 06:46

YESSSSSSSSSSSSSSS !

Changing to database locking solved the permission problem.

So As I wrote earlier, I uninstalled all themes and unnecessary modules.
Uninstalled URL rewrite and rating, installed them again

burt the problem was still there.... untill I realised I still had files in : modules/rating/templates/local.....

I deleted "local" folder, and now it works... so it's one the the theme's customized rating templates that was corrupting, I guess it's x-treme but it could be only for me...

so I guess I could have done that a little sooner and we'll both have saved time

I will now reinstall the PG lightbox and the modules I need....one by one, trying all modules one after the other, so next time I know which one is corrupting the website :-)

Thank you again Nivekiam, I appreciate your great help !

Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql 5.0.68, lock.system=flock
Operating system = Linux

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9025
Posted: Fri, 2009-07-10 06:54

glad it's working
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
lightpainter

Joined: 2005-11-25
Posts: 64
Posted: Fri, 2009-10-02 14:21

Thanks to both of you so much for this thread! I am using PG xtreme and love it, it seems to be working very well for me on g2.3. However, the ratings were not registering when clicked. I renamed the modules/rating/templates/local directory so it would not be used, deleted the template cache, and no bingo, the ratings appear and work perfectly!
-----------------------------
www.lightpainter.co.uk

Login or register to post comments
vermontoise

Joined: 2009-10-09
Posts: 1
Posted: Fri, 2009-10-09 18:33

And I second the thanks - did the same as lightpainter and voila! :-) Relief. (Note: this was on x_treme theme.)

Login or register to post comments