Problem with URL Rewrite

cornelia

Joined: 2007-09-05
Posts: 18
Posted: Wed, 2007-09-12 20:21

Maybe someone could help here. Please read my problems at http://gallery.menalto.com/node/68957

I now found out, that the problems disappear, when I deactivate "URL Rewrite". I setup a test-gallery, but unfortunately it worked there from the beginning and this gallery is on the same server as the "problem galleries"

____________________________________________________________________________

Gallery-Version = 2.2.3 Kern 1.2.0.5
Webserver = Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/5.2.0
Datenbank = mysqli 4.1.22-stan

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-09-12 21:58

topic moved to the support forums. this isn't a development question.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
cornelia

Joined: 2007-09-05
Posts: 18
Posted: Sun, 2007-09-16 13:28

Unfortunately the problem still exists. After "playing" with the "maintainance" it stopped working.

First I would like to compare checksums:

md5sum gallery-2.2.3-full.tar.gz
df5c1a6ecbf0b498417ceffc66fe5f3b gallery-2.2.3-full.tar.gz

sha1sum gallery-2.2.3-full.tar.gz
d2624a89fa6d3b97c0b4c644fe1071b918e4d29e gallery-2.2.3-full.tar.gz

I think it would be a good idea to put the checksums at the download-area, so it is possible to check, if the download is broken.

Here you see, what I got. It works again, if I remove url-rewrite. With the matrix and the hybrid-theme you see the 2 slashes at the bottom instead of "album quick links (DHTML)

[img]http://g2.album.priv.at/slasherror_matrix.jpg[/img]

[img]http://g2.album.priv.at/slasherror_hybrid.jpg[/img]

With the hybrid-theme there is also the 1st row cut-off at the top.

I use firefox as browser:
Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.6) Gecko/20070730 SUSE/2.0.0.6-2.1 Firefox/2.0.0.6

I tried more than once to empty the browser's cache and it didn't helo, but with Internet Explorer I noticed, that another gallery worked after the cache of the browser was cleared, while this didn't work with a 3rd gallery.

I also noticed with 1 gallery, that it didn't work to change the color pack, with the matrix-theme, while it worked with the hybrid-theme. I changed the colorpacks in each theme separately of course. In another gallery it was no problem to change the colorpacks.

A lot of mad things. Since it works sometimes it looks for me if some cache is not updated, while other cached "things" are updated.

You can check with your system the gallery at g2.album.priv.at (I didn't use htpp:// since I don't want that this testgallery is indexed by searchengines)

Developers can get access to this gallery. Please contact the webmaster of g2.album.priv.at

____________________________________________________________________________

Gallery version = 2.2.3 core 1.2.0.5
PHP version = 5.2.0 apache
Webserver = Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/5.2.0 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a
Database = mysqli 4.1.22-standard, lock.system=database
Toolkits = ArchiveUpload, Exif, ImageMagick, LinkItemToolkit, Thumbnail, Gd
Acceleration = none, none
Operating system = Linux accelex.everity.com 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 26 14:30:58 EDT 2007 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.6) Gecko/20070730 SUSE/2.0.0.6-2.1 Firefox/2.0.0.6
Rows in GalleryAccessMap table = 31
Rows in GalleryAccessSubscriberMap table = 8
Rows in GalleryUser table = 2
Rows in GalleryItem table = 6
Rows in GalleryAlbumItem table = 3
Rows in GalleryCacheMap table = 0

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2007-09-16 14:33

@checksums:
g2 has an end-to-end checksum. checksums for archives are nice, but most users still need to extract files on their desktop and upload thousands of files / dirs via FTP to their webhost. and this upload process is far more error-prone than the archive download.
so that's why there's an integrity check in the installer / upgrader.
see:
FAQ: How can I make sure that my installation files are all intact?

archive checksums wouldn't hurt, but the file integrity check goes beyond that.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
cornelia

Joined: 2007-09-05
Posts: 18
Posted: Sun, 2007-09-16 16:56

Ok, with this test gallery I never saw any errors or warnings. I hope floridave can find out, what's going wrong. Thanks a lot floridave for your help! For those who have a look at the gallery: I removed in the meantime modules/rewrite as he requested.

____________________________________________________________________________

Gallery-Version = 2.2.3 Kern 1.2.0.5
Webserver = Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/5.2.0
Datenbank = mysqli 4.1.22-stan

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2007-09-16 23:23

Somehow the rewite module adds "//" to the file.
On further investigation the javascript of the album select module might be corrupt.
I was not able to get by the authentication to verify that the files are in fact intact.
FAQ: How can I make sure that my installation files are all intact?

It could also be the special characters you are using for the keywords. I don't know much about html entities but I bet that is what is making the JavaScript choke.

I hope that gives you more info on what to do next.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
cornelia

Joined: 2007-09-05
Posts: 18
Posted: Mon, 2007-09-17 17:38

Hi floridave,

I checked the files already with different galleries as mentioned in the FAQ and there were no errors. Valiant mentioned that there is a "special check" so it doesn't make sense to compare checksums. But I cannot exclude, that the "maintainance" makes some files corrupt, because it works as long as I don't use the rewrite-check in the maintainance-section. I have no idea, if a 3rd-party module can influence the rewrite-module.

I think the tag-module doesn't support keywords written in UTF-8. The other galleries, we use, contain latin1-tags and make the same problems. Feel free to remove all the pictures from g2.album.priv.at and upload other photos. You can change and try everything, since this is a test gallery.

I have no idea what to do next. Can this thread become an "official bug report"? Since I think this is a bug, I started posting in the development section.

____________________________________________________________________________

Gallery-Version = 2.2.3 Kern 1.2.0.5
Webserver = Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/5.2.0
Datenbank = mysqli 4.1.22-stan

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2007-09-17 20:19

remove all keywords that have a special characters as well as albums names, and delete all 3rd party modules. See if that helps.

If you can narrow down the issue to be a conflict with the rewite and album select modules with special characters feel free to add a bug report as long as you can narrow down the steps to reproduce.
I can't reproduce your issue on my test setup.

In the meantime don't use one of the 2 modules.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Quote:
I have no idea what to do next.

 
quadramentis

Joined: 2008-02-25
Posts: 7
Posted: Mon, 2008-02-25 14:02

I can confirm - this URL Rewrite problem does exist, although it is very weird.

I managed to nail this down to the show item rule - all the others in my setup work fine, and only 'show item' causes two slashes instead of the album select.

Also, this problem is manifested as a PHP error, which doesn't seem anyhow related to URL Rewrite:
[25-Feb-2008 04:57:50] PHP Fatal error: Call to a member function onLoad() on a non-object in /modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 91

Can somebody help me to nail down the exact reason?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-02-25 14:46

Can you list the steps to reproduce?
I am unable to reproduce this error.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
quadramentis

Joined: 2008-02-25
Posts: 7
Posted: Mon, 2008-02-25 21:59

Floridave, thanks for replying.

I'll work on the steps to reproduce - I'll have to try with a fresh "test install" of G2 - my current setup is over a year old.

I'm trying to enable that "show item" rule, and just walk all albums to see if at least one of them has Album Select displayed properly: nope... Thus, unless G2 walks _all_ the items when displaying a single page, I doubt that this problem is name/filename-related, so it should be (somehow) reproducible on your setup.

Here's my configuration:
- admin->Album Select Settings: all checkboxes except the last one
- theme used: matrix
- edit album-> theme: album_theme.png (attached, red underline for the non-working block)
- I have 42 active modules - too many, I know, but most are used (Captcha, Core, Integrity Check, Notification, Permalinks, Rearrange, Search, URL Rewrite, Ffmpeg, Gd, ImageMagick, Jpegtran, Album Select, Image Block, Dynamic Albums, Flash Video, Hidden Items, Icons, ImageFrame, Keyword Albums, New Items, Panorama, Password Items, Random Highlight, Slideshow, Thumbnail Page, Watermark, RSS, Sitemap, Comments, Custom Fields, EXIF/IPTC, Getid3, MIME Maintenance, MultiLanguage, Rating, Reupload, Statistics, Tags, Add Items, Upload Applet)
- filenames do not use non-English characters; most of the items are in English only
- MySQL 5.0.45, utf8_general_ci; PHP 5.1.4; Linux kernel 2.4.21; Apache (version currently not known)

Do you have any clues about that "line 91" error? It's popping out with each and every pageview, when doubleslashes appear instead of album select.

(meanwhile, completed installing testgallery. Will configure tomorrow.)

 
quadramentis

Joined: 2008-02-25
Posts: 7
Posted: Tue, 2008-02-26 14:16

I was also unable to reproduce this problem on a fresh install :( , but suddenly...

There was a plugin/module, which wasn't present in the fresh G2: Statistics (in addition to Integrity Check, but IC's installation didn't seem to have any effect).
After I installed Statistics and recalculated 'disk usage', I'm now seeing two slashes in that "freshly installed" G2!
Other symptoms are exactly the same: URL Rewrite's "show item" rule switches two-slashes on and off.
Strangely, however, but deactivating/uninstalling/deleting Statistics doesn't fix the problem... So it still might be some coincidence or another action to trigger the problem.

Now I'll try "minimal problem reproduce", and will post it here (if successful).

 
quadramentis

Joined: 2008-02-25
Posts: 7
Posted: Wed, 2008-02-27 07:01

This problem is now reproducible in these steps:

- install full gallery
- during install, activate these plugins: album select, add items, integrity check, permalinks, url rewrite, gd
- configure/activate URL rewrite module (apache mod_rewrite)
- activate all url rewrite rules
- edit root album->theme: add dhtml album select to 'album pages'
- tree doesn't show: add album 'test'. Now the album tree will be shown.
- install Statistics plugin (from Community repository)
- go to Statistics menu in Site Admin, choose Disk statistics tab, press Recalculate
- when recalculation is complete - two slashes will be seen

After that, turning off and on "show item" rewrite rule will turn off and on "two slashes".

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2008-02-27 14:41

Thanks for the great detective work!
I will see what I can do.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
fjehoel

Joined: 2007-01-12
Posts: 3
Posted: Wed, 2008-03-26 16:32

I'm having exactly the same problem, it started after i tried to calculate the statistics (which didn't even work...)
Is there a solution to fix it?

 
quadramentis

Joined: 2008-02-25
Posts: 7
Posted: Sun, 2008-03-30 22:02

Dave,

if you post the proposed course of actions to solve the problem, I'd try to do at least a part of the list. Or maybe there are several things to try - my test install is up, so I could help, but I just don't quite know where to start looking.

I prefer to have DHTML Album Select over Statistics, so finding what was screwed up (in order to fix it) is of highest priority within this problem, I think.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-03-30 22:24

Not much time for me or other to work on this issue.
So I guess the next step is to ask the Statistics module author to look into this and look at the code to see where/why it causes this.

I suspect it is a javascript issue with not escaping code properly.
here is an example where text is used in a javascript function:
{g->text text="Yes" forJavascript=true}

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
quadramentis

Joined: 2008-02-25
Posts: 7
Posted: Sun, 2008-03-30 23:05

just sent PM to Aidan Lister, the author.

 
cchiappa
cchiappa's picture

Joined: 2008-08-11
Posts: 101
Posted: Mon, 2008-08-18 19:36

For what it's worth, this problem still exists. I had the DHTML tree activated on my sidebar, and decided to try out the statistics module. As soon as I calculated statistics, many of my albums went dead. (Gallery 2.2.5, statistics module installed from Get More Plugins).

 
Lucent

Joined: 2005-01-12
Posts: 3
Posted: Fri, 2008-11-07 18:39

I can confirm that this exists in 2.3. The statistics module killed my gallery as well, creating the same error. Uninstalling the module did not repair this, and disabling URL rewrite fixes it, just as described above.

I get the feeling that this can be repaired by editing a few characters somewhere in the database or PHP. If anyone wants to go through the effort of running a diff between statistics enabled then disabled and statistics never enabled and tell us what precisely is awry, that'd be a spectacular fix until a real one is found. Also, it'd probably be a good idea to hide Statistics from the installable module list until then.

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Mon, 2008-11-10 02:54

I don't have time to investigate this at the moment - however it's very surprising. The statistics module writes a single file to the data cache when recalculating, there's no other write interaction. I'll see if I can track it down sometime next month.