Bug with sitemap?

Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Mon, 2013-02-18 03:07

If I didn't miss to configure something, there is a bug with the sitemap. The difference between G2 and G3 is that the url is domain/index.php while G2 doesn't use /index.php.

The sitemap-file of G3 doesn't include /index.php which leaded to a lot of errors shown in my access.log

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2013-02-18 23:17

I think the modules assumes that you have edited the .htaccess file to remove the index.php for your urls.
or I guess you can add the /index.php/ to the 'Enter base URL for your Gallery 3 installation' on the admin page.

If that works please update the docs to make it more clear.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Mon, 2013-02-18 23:46

It is a fresh G3 installation and I think it should work out of the box without editing something. I didn't edit the htaccess-file.

The file without comments:

.htaccess 

<IfModule mod_php5.c>
  php_flag short_open_tag            On
  php_flag magic_quotes_gpc          Off
  php_flag magic_quotes_sybase       Off
  php_flag magic_quotes_runtime      Off
  php_flag register_globals          Off
  php_flag session.auto_start        Off
  php_flag suhosin.session.encrypt   Off
  php_value upload_max_filesize      20M
  php_value post_max_size 	     100M
</IfModule>
<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>

Sorry I cannot find 'Enter base URL for your Gallery 3 installation' It is not a value in "Advanced settings".

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-02-19 03:49

It's a setting in the modules admin page.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Tue, 2013-02-19 09:26

Sorry, I can't find it. Do you mean Admin / Modules where I can read "Gallery Modules Power up your Gallery by adding more modules! Each module provides new cool features." ?

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Tue, 2013-02-19 13:19
Pinguin wrote:
It is a fresh G3 installation and I think it should work out of the box without editing something.

It (Gallery) does. Even if there's a bug with the sitemap module (I'm not sure if there is or not), that has nothing to do with Gallery working out of the box. The modules are overwhelmingly contributed (for free) by the community for the benefit of others who use Gallery. If there does prove to be a bug, feel free to (politely) message the author, or, even better, post in the module's dedicated thread: http://galleryproject.org/node/96068

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-02-19 15:02

Login as admin to your gallery install.
Click admin -> settings -> XML sitemap.
There is configuration screen for the module. Like some other modules it requires configuration to work. How is the author to know "out of the box" your desired settings?
If that page is not there for setting the modules configuration, then I guess you have not installed the module properly.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Tue, 2013-02-19 15:39

You are right, I didn't understand "Enter base URL for your Gallery 3 installation on the form http://your.domain.com/, http://your.domain.com/gallery3/, https://your.domain.com/index.php/ or similar."

My G3 gallery is opened with http://your.domain.com/ and then redirected automatically to http://your.domain.com/index.php (default). It looks like I need to enter http://your.domain.com/index.php but there are now problems with sitemap.xsl, which I didn't have before. Hopefully I will find the problem.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-02-19 23:31
Quote:
You are right,

Please make the contribution to the community make the necessary changes to the documentation that the community can do. As you should know after 7 years as a community member.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Pinguin

Joined: 2005-09-27
Posts: 210
Posted: Wed, 2013-02-20 00:24

Wait a few days please, I am very busy, I am unsure if there isn't a bug with the xsl file. I get a network error, when I try to view the xml-file with firefox. (XSLT-Stylesheet error). In German it says: "Beim Laden eines XSLT-Stylesheets ist ein Netzwerkfehler aufgetreten:" The xml file looks fine at first sight. Chromium shows an empty page, when I enter the xml-url.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Wed, 2013-02-20 15:10
Pinguin wrote:
I am unsure if there isn't a bug with the xsl file.

I tested the sitemap module a long while ago and everything worked as expected. I'm not sure if there's been an update to the code/version, but I wouldn't imagine that it was updated to a non-working version and no one's noticed. Hard to pin down what your issue may be without a link to your site and the sitemap files.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Fri, 2013-02-22 20:30

@Pinguin: I got your pm and took a look at your site.

The issue is that your sitemap is looking for http://yoursite.com/index.php/sitemap.xsl but the actual url is http://yoursite.com/sitemap.xsl

I'm not sure if the issue is an "out of the box" issue for sites that do not use the htaccess index.php removal, or the result of some other change somewhere.

Two quick options come to mind (neither addresses why it happened, just how to work around it):

(1) Edit the sitemap module directly to hardcode the appropriate url or to strip out "index.php" from a dynamic url if the extension is xsl. (FYI: If this is an issue for all sites using the sitemap module that have not removed index.php from the url, the strip can be done in php to apply only to those sites and added to the module in an updated version.)

(2) Add a rewrite to your htaccess file: RewriteRule ^index.php/sitemap.xsl http://yoursite.com/sitemap.xsl