Title Search "contains" module results comes up 'blank'...sometimes

TAZattitude

Joined: 2009-04-27
Posts: 56
Posted: Tue, 2009-04-28 01:48

Hello,
I have the "Title Search" module installed inc both the 'contain' (Display items containing:) and the 'begin' (Items beginning with:) and I can't seem to get the 'contain' to work correctly. When you start typing, the drop down comes down with choices like its supposed to, but when you click on any of the choices with what seems more than 3 or 4 letters/numbers, and you click on the 'View' button, the result page comes up blank.
i.e...you type in 10 and if you choose the 10, then the results show up after clicking 'View', but when you type 10 and you choose CR1001 and click the 'View' button, it comes up blank.

I have the URLrewrite on for both variations of this module, but I noticed that only the 'begin' with part of the module worked. It showed ...gallery2/begin/R in the URL, but the 'contain' part of the module still showed ...main.php?g2_view=title.Contain&g2_chars=xxxx

Here is the URL if anyone could take a look please.
http://www.xxxxx.com/gallery2/main.php (URL changed after solving the problem)
Remember the rewrite is on both.

To test, click on "r" for the begin with module (this will work fine include the rewrite module)
For the 'contain' module, type in 10 and choose "10" you will see this works fine. But choose CR1001 and click on the View button and you will see a blank page.

Any help or info on how to correct would be appreciated it...
Thanks in advance.

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.9 apache2handler
Webserver = Apache/2.2.10
Database = mysqlt 5.0.67-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, ImageMagick, jpegtran, LinkItemToolkit, NetPBM, Thumbnail, SquareThumb
Acceleration = none, none
Operating system = FreeBSD ezera.pair.com 6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #1: Mon May 7 14:30:09 EDT 2007

:/usr/obj/usr/src/sys/6PAIRc-SMP i386
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.9) Gecko/2009040821 Firefox/3.0.9 (.NET CLR 3.5.30729)
Rows in GalleryAccessMap table = 18
Rows in GalleryAccessSubscriberMap table = 8392
Rows in GalleryUser table = 2
Rows in GalleryItem table = 8386
Rows in GalleryAlbumItem table = 788
Rows in GalleryCacheMap table = 0

 
mridgwel

Joined: 2007-01-27
Posts: 215
Posted: Tue, 2009-04-28 18:33

I found something similar a while back but haven't got round to finishing diagnosing the problems before reporting it.

So far the only thing I can see common is that if the contains only finds one item you get an error. Zero items is fine as is two or more. I hacked my installation to return a 2nd item if only one item is found while looking into what was going on and that seemed to get past the problem. I've not had the time to trace much further than that or confirm if that is the only cause.

If anyone needs any more details\diagnosis to fix the problem then let me know and I'll provide what I can etc.
_________
Mark
ACCU - www.accu.org - Professionalism in Programming.

 
TAZattitude

Joined: 2009-04-27
Posts: 56
Posted: Tue, 2009-04-28 23:09

Thanks for the reply Mark.
It does seem that is what happens...strange.
Definitely would be an asset to my website. If you or anyone comes up with a solution, please let me know.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Thu, 2009-04-30 13:13

Speaking as the module author :-) ...

there are one or two errors in the dynamic album module which I've fixed since the code was put in the repository. I'm uploading the fixes now, and the module should be updatable in a few hours. I think that will take care of things. If not, please report in this thread.

@mridgwel et al - I'm always happy to look at bug reports - no need to diagnose, necessarily, before posting.

EDIT: latest revision from the repository should be 1841, available in six hours time (just missed a push)

 
TAZattitude

Joined: 2009-04-27
Posts: 56
Posted: Thu, 2009-04-30 13:33

Great to hear!
I had made a change to the Begin file that made it work. I'm not for sure if it was correct or not...but it did make it work!
I changed the if (empty($itemId) && count($childIds) == 1) to if (empty($itemId) && count($childIds) == 0)
I will download the updated version tonight.
Thanks for the module!!! This is an excellent add-on. Works great for my particular site/setup

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Thu, 2009-04-30 13:38

I think there was a problem if there was only one item returned from the db. What happens now is that in that case you're taken directly to that item in its album context, without an intermediate page.

 
mridgwel

Joined: 2007-01-27
Posts: 215
Posted: Thu, 2009-04-30 18:39

Just updated from SVN and its worked perfectly. I'll let you know if I find anything else. Part of the reason for diagnosing was to learn more on how things fit together, and wanting to provide sufficient info to fix, more than stating "Sometimes it doesn't work"
_________
Mark
ACCU - www.accu.org - Professionalism in Programming.

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Thu, 2009-04-30 18:39

If you ever work out how the various Gallery2 objects and functions like loadThemeAndParameters() and loadTemplate() are supposed to fit together I'm all ears... 12 months of G2 programming and it's still a thick fog to me.

 
TAZattitude

Joined: 2009-04-27
Posts: 56
Posted: Fri, 2009-05-01 15:37

Stupid question....how do I go about downloading or installling the new version?
I figured I would just go to the admin plugins and update the Repository List inc 3rd party modules and it would come up as 'upgrade available'.
It just shows "Title Search" as locked.
It shows it as version 0.1.0

Thanks!

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Fri, 2009-05-01 15:45

It's definitely avaialable as an upgrade - I just checked. "Locked" means there's a problem with the directory permissions for that module on your server - Gallery can't write to the directory.

 
TAZattitude

Joined: 2009-04-27
Posts: 56
Posted: Fri, 2009-05-01 21:54

Thanks alec! Works great!