Module: XML sitemap

OC2PS
OC2PS's picture

Joined: 2010-09-08
Posts: 420
Posted: Sun, 2011-06-19 08:31

Google Webmaster Tools seems to have a problem with the sitemap:

Quote:
URLs not followed
When we tested a sample of URLs from your Sitemap, we found that some URLs redirect to other locations. We recommend that your Sitemap contain URLs that point to the final destination (the redirect target) instead of redirecting to another URL.

SoosKriszta
Csillamvilag.com

Bodypainting, Facepainting, Glitter, Henna
HennaLap.com

 
OC2PS
OC2PS's picture

Joined: 2010-09-08
Posts: 420
Posted: Mon, 2011-06-20 16:47

Any guidance would be appreciated!

SoosKriszta
Csillamvilag.com

Bodypainting, Facepainting, Glitter, Henna
HennaLap.com

 
inposure
inposure's picture

Joined: 2010-04-23
Posts: 304
Posted: Mon, 2011-06-20 19:52

How can anyone guide you without any sort of details? You need to provide information. A lot of information. Like a URL to the sitemap and your site (the actual gallery site, nobody is going to wade through your commercial stuff to find it).

--
http://inposure.se/

 
OC2PS
OC2PS's picture

Joined: 2010-09-08
Posts: 420
Posted: Mon, 2011-06-20 20:00

Sorry, the sitemap is at http://www.csillamvilag.com/kepek/sitemap.xml

Since I installed the standard module, I imagined someone would be able to have suggestions based on module logic without the actual specific sitemap at hand.

SoosKriszta
Csillamvilag.com

Bodypainting, Facepainting, Glitter, Henna
HennaLap.com

 
inposure
inposure's picture

Joined: 2010-04-23
Posts: 304
Posted: Mon, 2011-06-20 22:40

Poking at random, I see an item like this:

http://www.csillamvilag.com/kepek/2010-nyari-fordulo/csillam_tetovalas/T_th-Anita-_6_

It leads nowhere, although other items are correct.

If you change anything in your album, the sitemap will not update automatically. The sitemap gets all its data from the database, whatever is there will be included.

--
http://inposure.se/

 
brentil
brentil's picture

Joined: 2007-04-11
Posts: 121
Posted: Mon, 2011-06-20 22:41

Getting the folloing after upgrading to sitemap 3 and upgrading Gallery to 3.0.2 and I check the "Build sitemap now" option at the bottom. It does seem to be building the sitemap however.

Also it's not picking up and adding index.php to the path in the sitemap it builds and when I add /index.php/ to the new sitemap path in the config it does not build a sitemap anymore.

Quote:
ErrorException [ Warning Message ]:
Wrong parameter count for strstr()
MODPATH/sitemap/controllers/admin_sitemap.php[ 243 ]

238 $robots_txt = (file_exists($file)) ? file_get_contents($file) : '';
239
240 $def_begin = "# BEGIN XML Sitemap";
241 $def_end = "# END XML Sitemap";
242
243 $before = strstr($robots_txt, $def_begin, true);
244 if ($before) {
245 $split = explode($def_end, $robots_txt);
246 $after = $split[1];
247 $newtext = <<< EOT
248$before
{PHP internal call} » gallery_error_Core::error_handler()

MODPATH/sitemap/controllers/admin_sitemap.php[ 243 ] » strstr( arguments )

MODPATH/sitemap/controllers/admin_sitemap.php[ 191 ] » Admin_Sitemap_Controller->_robots_txt( arguments )

MODPATH/sitemap/controllers/admin_sitemap.php[ 35 ] » Admin_Sitemap_Controller->_build_sitemap()

{PHP internal call} » Admin_Sitemap_Controller->handler()

MODPATH/gallery/controllers/admin.php[ 62 ] » call_user_func_array( arguments )

{PHP internal call} » Admin_Controller->__call( arguments )

SYSPATH/core/Kohana.php[ 331 ] » ReflectionMethod->invokeArgs( arguments )

{PHP internal call} » Kohana_Core::instance( arguments )

SYSPATH/core/Event.php[ 208 ] » call_user_func_array( arguments )

APPPATH/Bootstrap.php[ 67 ] » Event_Core::run( arguments )

DOCROOT/index.php[ 102 ] » require( arguments )

 
inposure
inposure's picture

Joined: 2010-04-23
Posts: 304
Posted: Mon, 2011-06-20 23:40

strstr is a PHP 5.3 version, I guess you have an older version. I have replaced sitemap.zip with a compatible alternative to strstr.

As for the index.php, it works for me. Without a lot of more detail there is nothing I can do.

Obviously, you cannot just add /index.php/, you must add the entire domain as well: http://your.domain.com/index.php/

--
http://inposure.se/

 
inposure
inposure's picture

Joined: 2010-04-23
Posts: 304
Posted: Tue, 2011-06-21 00:35

I have taken into account private extensions in the latest release.

wise_mike wrote:
I append the .html to the url, but the sitemap doesn't add them to the URLs, although it used to do that before the upgrade.. any ideas how to do it?

Thanks in advance,

--
http://inposure.se/

 
OC2PS
OC2PS's picture

Joined: 2010-09-08
Posts: 420
Posted: Tue, 2011-06-21 07:02
inposure wrote:
If you change anything in your album, the sitemap will not update automatically.

So, I rebuilt the sitemap and got this:

Quote:
Sitemap has been saved to /home/content/00/7476000/html/csillamvilag/kepek/sitemap.xml (482453 bytes).
Google has been notified about your sitemap http://csillamvilag.comsitemap.xml
Bing has been notified about your sitemap http://csillamvilag.comsitemap.xml
Ask has been notified about your sitemap http://csillamvilag.comsitemap.xml
Updated /var/chroot/home/content/00/7476000/html/robots.txt (2 bytes)
Settings have been saved

Seems that XML sitemaps is not using the correct location of sitemap to ping search engines (missing the subfolder "kepek"). Also, it is missing the "/" in the URL.

inposure wrote:
Poking at random, I see an item like this:

http://www.csillamvilag.com/kepek/2010-nyari-fordulo/csillam_tetovalas/T_th-Anita-_6_

It leads nowhere, although other items are correct.

This is certainly something that I needed to correct. However, this would show up as a not found error in Google Webmaster tools. The bigger issue per Webmaster tools is "redirection"...do you know if any redirections are happening?

SoosKriszta
Csillamvilag.com

Bodypainting, Facepainting, Glitter, Henna
HennaLap.com

 
inposure
inposure's picture

Joined: 2010-04-23
Posts: 304
Posted: Tue, 2011-06-21 08:39

Whatever is in the database will be used by Sitemap. There is no redirection as far as I am concerned. There is a lot of redirection in Gallery in general though, like ?page=1 pages and such.

As for the missing slash and such, did you set base URL to http://www.csillamvilag.com/kepek/ (including end slash)?

Otherwise, I guess you have an older version, it works as intended for me.

--
http://inposure.se/

 
OC2PS
OC2PS's picture

Joined: 2010-09-08
Posts: 420
Posted: Tue, 2011-06-21 08:52

Had an older version...didn't have the option to provide base URL. Updated now. All seems good. Thanks!

How can I minimize G3 redirections? Or where should I ask this question?

SoosKriszta
Csillamvilag.com

Bodypainting, Facepainting, Glitter, Henna
HennaLap.com

 
brentil
brentil's picture

Joined: 2007-04-11
Posts: 121
Posted: Tue, 2011-06-21 13:01

The updated version has fixed both the error and lack of building the file with the /index.php/ added to it.

One issue though is when you let it modify a robots.txt at a higher level it puts in http://www.MyURL.com/gallery/index.php/sitemap.xml as the path to the sitemap file which is incorrect.

 
inposure
inposure's picture

Joined: 2010-04-23
Posts: 304
Posted: Tue, 2011-06-21 20:23

Squashing bugs as they appear…

--
http://inposure.se/

 
fashionpix

Joined: 2011-06-25
Posts: 3
Posted: Tue, 2011-07-12 22:24

doesnt works with index in url !

 
alyen2

Joined: 2010-03-07
Posts: 1
Posted: Sun, 2011-08-07 07:26

Hello,

Google introduced a new sitemap for images.:
"xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"

This new format requiered two mandatory fields:
<image:image> & <image:loc>

Is it the only one to use this format?

 
pwgales

Joined: 2010-10-01
Posts: 4
Posted: Sat, 2011-09-10 16:26

I'm getting alot of entries in my xml file that point back to the root instead of the pictures. Any ideas?

http://pics.bobcat-football.com/sitemap.xml

 
pwgales

Joined: 2010-10-01
Posts: 4
Posted: Sat, 2011-09-10 21:57

It appears that the sitemap url is pulled from relative_url_cache which is Null in most instances in my items db. Is there a fix or work around?

 
wise_mike

Joined: 2008-10-21
Posts: 149
Posted: Mon, 2011-09-12 13:40

I don't know if this is related to your issue "pwgales", but when I click on the "fix gallery" button at the maintenance page, and then try to run try to build the sitemap, I don't get all the urls, or not all as they should be, and I have to wait for a day or something then run it again, and it works fine.. either ways, it is still an issue with the module that needs to be addressed..

 
undagiga

Joined: 2010-11-26
Posts: 643
Posted: Mon, 2011-09-12 23:29

I don't think that this is a problem with the module - it sounds like it is caused by one or more of the various caching options in G3. It's possible to turn them off and it's also possible to clear the cache.

 
zjohn13

Joined: 2010-12-01
Posts: 62
Posted: Sun, 2011-10-16 12:32

Excelent module inposure, it's working perfectly.
John

 
bogdanmircean

Joined: 2011-11-01
Posts: 1
Posted: Sun, 2011-11-06 23:07

Hello
I'm using the 3rd version of the module.
Maybe this is something specific for my site... The module is functional (sitemap.xsl and xml are generated) as long
as - album, pictures or movies are not included on the site map.
When I check the boxes for album/photos I always get the error messages below.
Could somebody help me? Thanking you in avance.

Database_Exception [ Database Error ]:
#1054: Unknown column 'view_1' in 'where clause' [ SELECT `relative_url_cache`, `updated` FROM `items` WHERE `type` = 'album' AND `view_1` = 1 ]

SYSPATH/libraries/Database_Mysqli_Result.php[ 27 ]
SYSPATH/libraries/Database_Mysqli.php[ 79 ] » Database_Mysqli_Result_Core->__construct( arguments )
SYSPATH/libraries/Database.php[ 272 ] » Database_Mysqli_Core->query_execute( arguments )
MODPATH/gallery/libraries/MY_Database.php[ 45 ] » Database_Core->query( arguments )
SYSPATH/libraries/Database_Builder.php[ 973 ] » Database->query( arguments )
MODPATH/sitemap/controllers/admin_sitemap.php[ 205 ] » Database_Builder_Core->execute()
MODPATH/sitemap/controllers/admin_sitemap.php[ 155 ] » Admin_Sitemap_Controller->_add_to_sitemap( arguments )
MODPATH/sitemap/controllers/admin_sitemap.php[ 35 ] » Admin_Sitemap_Controller->_build_sitemap()
{Appel interne PHP} » Admin_Sitemap_Controller->handler()
MODPATH/gallery/controllers/admin.php[ 62 ] » call_user_func_array( arguments )
{Appel interne PHP} » Admin_Controller->__call( arguments )
SYSPATH/core/Kohana.php[ 331 ] » ReflectionMethod->invokeArgs( arguments )
{Appel interne PHP} » Kohana_Core::instance( arguments )
SYSPATH/core/Event.php[ 208 ] » call_user_func_array( arguments )
APPPATH/Bootstrap.php[ 67 ] » Event_Core::run( arguments )
DOCROOT/index.php[ 102 ] » require( arguments )

my config is

Système d'exploitation : Darwin 11.2.0
Apache: Apache/2.2.20 (Unix) mod_ssl/2.2.20 OpenSSL/0.9.8r DAV/2 PHP/5.3.6 with Suhosin-Patch
PHP: 5.3.6
MySQL: 5.5.14
Charge du serveur: 1,521484375 1,43798828125 1,26806640625
Boîte à outils graphiques : gd

 
setishock

Joined: 2011-12-26
Posts: 33
Posted: Fri, 2012-01-20 11:20

Has any more been done with this module? I asked because the last post if I read the date right was November of 2011.

Animeappeal.com Presents
AnimeAppeal.com Presents

 
wise_mike

Joined: 2008-10-21
Posts: 149
Posted: Mon, 2012-02-06 14:49

Suddenly when I create a sitemap with this module, and submit it to google, I get an error saying:

Quote:
Duplicate URL - This URL is a duplicate of another URL in the sitemap. Please remove it and resubmit.
/Gallery/

Which is the root of my gallery.. don't know why is that, as I have been using the module for a while ago and it was working fine..

Any suggestions?

 
inposure
inposure's picture

Joined: 2010-04-23
Posts: 304
Posted: Sun, 2012-03-25 12:18

Addendum 2012-03-25: Version 4 uses ORM to get all URI:s from DB, although this will strain the server more.

Filename is different, I have no access to codex pages…

 
5hark

Joined: 2012-04-25
Posts: 1
Posted: Wed, 2012-04-25 20:30

Could you please tell where it's possible to download this module? Thanks in advance.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25967
Posted: Wed, 2012-04-25 22:12

zip file in first post of this thread.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25967
Posted: Wed, 2012-04-25 22:13
Quote:
I have no access to codex pages…

http://codex.gallery2.org/Gallery3:Modules:sitemap
login with forums username and password.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
janomona

Joined: 2012-05-03
Posts: 10
Posted: Sun, 2012-05-06 14:37

first thank you very much for such nice module....

I have one question how should i split the sitemap.... Can any expert here help me....

Thank you..

Regards, Mona

 
janomona

Joined: 2012-05-03
Posts: 10
Posted: Sat, 2012-05-26 11:05

I am trying to get below module but not able to..

Addendum 2011-05-24: Version 3 includes better database procedure to avoid crash on shared servers, and also lets the user customize the base gallery URL to accomodate for different setups.

My site is crashing with the latest version (4) so wanted to check with the previous version (3) but where is the source code??

Could you please help me out.

Thank you.

Regards, Mona

 
BillWill

Joined: 2008-08-28
Posts: 205
Posted: Thu, 2012-06-07 10:30

Hello -

I recently moved many of my photos into annual subalbums, and the changes aren't seen by the sitemap generator. I am getting tons of File not found errors, all of which are simply not finding the new information.

For example, in the error log it says:
File not found:
fundrive100910/IMG_2122

The correct URL is:
2010/fundrive100910/IMG_2122

Do you know where I can find and update the records that contain these outdated URLs?

===========================
Version: 3.0.3 (Hotlanta)
Operating system: Linux 2.6.18-194.11.4.el5
Apache/2.2.21
PHP: 5.3.8
MySQL: 5.0.95
Clean Canvas theme
Graphics Toolkit = ImageMagick
Albums: 199
Photos: 68913

 
wise_mike

Joined: 2008-10-21
Posts: 149
Posted: Sun, 2012-10-14 11:24

This module requires the Gallery folder to be chmod 777. Is it dangerous to leave it like that? or do I have to make the permissions 755 back each time I run the module?

 
Skin

Joined: 2003-05-06
Posts: 54
Posted: Thu, 2013-02-21 01:17

Hello,
I've just downloaded and installed this module from the first post here, but there is something wrong with the base url setting;
if I put in the "base url setting" the correct address, which is http://www.alessio.pointnet.eu/ , I can generate and see the sitemap, but all the url ar wrong, because they lack the /index.php/ virtual path created by .htacess :
for example a correct url for a photo is http://www.alessio.pointnet.eu/index.php/Macro-close-up/Macro_cavalletta_4343 but in the sitemap I find http://www.alessio.pointnet.eu/Macro-close-up/Macro_cavalletta_4343 , the /index.php/ is lost.

If in the "base url" setting I put http://www.alessio.pointnet.eu/index.php/ i can generate the sitemap, but if I go to http://www.alessio.pointnet.eu/sitemap.xml I've a blank page, because the generated sitemap.xml file search the stilesheet in the wrong path: http://www.alessio.pointnet.eu/index.php/sitemap.xsl ; in this case if I edit te sitemap.xml I see that all the urls are correct, I can see the correct path with the /index.php/.

Actually I've just manually modified the xml file and now it search the sitemap.xls where it really is ( http://www.alessio.pointnet.eu/sitemap.xsl ).

Is there a way to correct this bug? May be I can modify the .htaccess file and create a redirect from http://www.alessio.pointnet.eu/index.php/sitemap.xsl to http://www.alessio.pointnet.eu/sitemap.xsl ?

Or should I manually modify the sitemap.xml every time?

I hope you understand my bad english :-)

 
tempg

Joined: 2005-12-17
Posts: 1633
Posted: Fri, 2013-02-22 14:58

@wise_mike: I've use the module and did not have to set any permissions to 777. There's something different with your specific setup. (Maybe the owner of the Gallery changed before you installed the module?)

Skin: I'm not commenting on the rest of the post, but regarding the htaccess (as a temporary workaround), adding this line didn't work for you?: http://galleryproject.org/node/110947#comment-401786

 
Skin

Joined: 2003-05-06
Posts: 54
Posted: Fri, 2013-02-22 18:09

I've tried with the .htaccess workaround, but won't work.

Here is a part of my .htaccess:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^alessio.pointnet\.eu$ [NC]
RewriteRule ^(.*)$ http://www.alessio.pointnet.eu/$1 [R=301,L]
RewriteRule ^/index.php/sitemap.xsl http://www.alessio.pointnet.eu/sitemap.xsl

If I click on http://www.alessio.pointnet.eu/index.php/sitemap.xsl I've an error....

 
tempg

Joined: 2005-12-17
Posts: 1633
Posted: Fri, 2013-02-22 20:32

@Skin: Remove the first "/":
RewriteRule ^/index.php/sitemap.xsl http://www.alessio.pointnet.eu/sitemap.xsl
should be
RewriteRule ^index.php/sitemap.xsl http://www.alessio.pointnet.eu/sitemap.xsl

 
Skin

Joined: 2003-05-06
Posts: 54
Posted: Fri, 2013-02-22 22:11

Thanks tempg, now it works :-)

 
micks80

Joined: 2012-04-22
Posts: 71
Posted: Wed, 2013-04-17 11:34

Hi,
The 'photos' option doesn' seem to work on sites with large number of photos. We have about 36k photos in our gallery site and everytime we enable that option, it throws this error in chrome -
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request

Works with with albums. It would be good if you could split that file and process small chunks of data at one time and aggregate them at the end. I understand this will require time and effort from your end, so let me know if this is something you plan to do or not.

Thanks,
Mick