Gallery logs out while searching

jort.steijn

Joined: 2013-02-01
Posts: 7
Posted: Fri, 2013-02-01 13:07

My problem is only occuring since two days.
In these days the only things that i have changed where some custom field values.

When i want to search the gallery i get logged out automatically.
I have put gallery in debug mode and i get this error message:

Notice: Array to string conversion in W:\Ampps\www\album\modules\core\classes\GalleryUrlGenerator.class on line 485

I have changed permissions so guests can also see the album and when i do the search it works but i get this two error messages:

Notice: Undefined variable: albumId in W:\Ampps\www\colouramadesigns.net\modules\core\classes\GalleryCoreSearch.class on line 138

Notice: Undefined variable: albumName in W:\Ampps\www\colouramadesigns.net\modules\core\classes\GalleryCoreSearch.class on line 297

I don't know if it helps...

I have already tried switching from my webhost to our own environment, but still the same problem!


Gallery version : 2.3.1 core 1.3.0.1
PHP version : 5.3.20 cgi-fcgi
PHPInfo Link : 188.95.25.23/phpinfo.php
Webserver: Apache:
Database: mysqli 5.1.63-0
Activated toolkits: Netbpm
Operating system (Windows server 2008r2)
Browser : Tried with Google Chrome and Internet Explorer)

I hope that you can help me with this!

Thank you!

Jort

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-02-01 14:04

It does look like this could be related to your custom field changes.
Gallery is having trouble parsing the url formed from your search.
If you roll back the changes in custom fields does it fix the problem?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
jort.steijn

Joined: 2013-02-01
Posts: 7
Posted: Mon, 2013-02-04 10:56

I've deleted all the entry's from the last 2 weeks, but it doesn't solve the problems.
What seems to occur all the time is that it my gallery makes very long url's can it have something to do with this?

Here's an example of a url that i get when i search and i am logged out automatically:

http://mywebsite.net/main.php?g2_return=%2Fmywebsite.net%2Fmain.php%3Fg2_GALLERYSID%3D6e8f822435787326c7817af2e00aeaf8&g2_formUrl=%2Fmywebsite.net%2Fmain.php%3Fg2_GALLERYSID%3D6e8f822435787326c7817af2e00aeaf8&g2_authToken=aaf440ace785&g2_view=search.SearchScan&g2_form%5BformName%5D=search_SearchBlock&g2_form%5BsearchCriteria%5D=32201&g2_form%5BuseDefaultSettings%5D=1

When i search as a guest i only get this: http://colouramadesigns.net/colouramadesigns.net/main.php

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-02-04 16:21
Quote:
Notice: Undefined variable: albumId in W:\Ampps\www\colouramadesigns.net\modules\core\classes\GalleryCoreSearch.class on line 138

Notice: Undefined variable: albumName in W:\Ampps\www\colouramadesigns.net\modules\core\classes\GalleryCoreSearch.class on line 297

These don't make any sense to me. Are you using a customized GalleryCoreSearch.class? There are only 200 lines in GalleryCoreSearch.class so where 297 is coming from.

Restore the default GalleryCoreSearch.class and I bet your woes will go away.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
jort.steijn

Joined: 2013-02-01
Posts: 7
Posted: Tue, 2013-02-05 08:15

I have replaced my GalleryCoreSearch.class, and the two error messsages went away. Strange thing is that i never edited this file.
However this error line still exists and it is still logging me out when i try to search, and also when i browse through the gallery at random moments:

Notice: Array to string conversion in W:\Ampps\www\colouramadesigns.net\modules\core\classes\GalleryUrlGenerator.class on line 485

I have also restored this file from an original version, but it doesn't help.

If you want i can send you the link of our gallery website so you can have a look?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2013-02-05 12:03

1st lets make sure your installation files are original
FAQ: How can I make sure that my installation files are all intact?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
jort.steijn

Joined: 2013-02-01
Posts: 7
Posted: Wed, 2013-02-06 10:43

This is the list of files that are not original:

embed.php
images/galleryLogo_sm.gif
images/galleryLogo_sm.png
main.php
modules/cart/module.inc
modules/core/classes/Maps.xml
modules/core/module.inc
modules/core/templates/UserRecoverPasswordEmail.tpl
modules/imagemagick/data/test.svg
modules/search/templates/SearchScan.tpl
modules/search/templates/blocks/SearchBlock.tpl
themes/matrix/images/gallery_logo.png
themes/matrix/templates/album.tpl
themes/matrix/templates/photo.tpl
themes/matrix/templates/theme.tpl
themes/matrix/theme.css

Please note that i edited a few files when i configured the database 2.5 years ago!
And it worked all the time like this. There is nothing else i changed in the past year.

I have only added pictures and filled in custom fields.

 
jort.steijn

Joined: 2013-02-01
Posts: 7
Posted: Mon, 2013-03-04 09:24

I cannot solve the problem, is there any possibility that one of the developers can have a look at it?
Please let me know something if this is possible!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2013-03-04 13:05

please download a fresh copy of your current version and replace the non-original files:
embed.php
main.php
modules/cart/module.inc
modules/core/classes/Maps.xml
modules/core/module.inc
modules/imagemagick/data/test.svg

there would be no reason to edit those.

also if you don't remember editing the following replace them as well:
modules/core/templates/UserRecoverPasswordEmail.tpl
modules/search/templates/SearchScan.tpl
modules/search/templates/blocks/SearchBlock.tpl

the password recovery template would be a good place for a hacker to insert bad code.

You may have to upgrade to 2.3.2 as I don't see 2.3.1 available.

-s
________________________________
All New jQuery Minislideshow for G2/G3