Jump to content
Jack_mcs

Google XML Sitemap SEO

Recommended Posts

I did go through all the instructions. I meant that when I tried generating the sitemap via domain.com/googlesitemap/index.php, the "[an error occurred while processing this directive]" comes up in the browser. I've set all the permissions to 777.

Share this post


Link to post
Share on other sites

I did go through all the instructions. I meant that when I tried generating the sitemap via domain.com/googlesitemap/index.php, the "[an error occurred while processing this directive]" comes up in the browser. I've set all the permissions to 777.

 

Oh yes, I forgot to mention. When I go through the process in localhost, everything is just fine. But on my webhost (Bluehost), I get the above problem. If that helps.

Share this post


Link to post
Share on other sites

Oh yes, I forgot to mention. When I go through the process in localhost, everything is just fine. But on my webhost (Bluehost), I get the above problem. If that helps.

If you are saying you can't display anything on the sitemap page without getting that error then there is something wrong with your installation or a restriction by the server. You will need to ask your host to look at the problem.

Share this post


Link to post
Share on other sites

Hi Jack,

 

I'm running the 1.4 version of this contribution, four languages. I'm experiencing the following:

 

sitemapspecials.xml

I have total of 8 products in category specials, however sitemapspecials.xml shows four identical (all English language) links for each product, 32 links in total. The sitemapcategories.xml and sitemapproducts.xml are OK - one link per category and one link per product.

 

Any ideas please?

Hi Jack,

 

did you have a chance to have a look at the above issue please?


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

Hi Jack,

 

did you have a chance to have a look at the above issue please?

No, not yet.

Share this post


Link to post
Share on other sites

A new version has been uploaded with these changes:

 

- Added code to allow excluding pseudo pages from the supported contributions

- Changed code in the sitemap.class files to exclude the Quotes if that contribution is installed.

- Changed code so that the specials sitemap only contains the links for one language.

- Fixed coding mistake in alternate file that would add an extra / to the url in some cases.

- Replaced ereg calls with preg ones.

Share this post


Link to post
Share on other sites

Hello There,

 

Quick question, I'm running my site on a webhosting addon slot (in other words the site is stored in a secondary folder in the root, with the domain pointing towards that folder),

I'm keep getting:

XML Parsing Error: no element found

Location: http://www.mysite.com/sitemapindex.xml

Line Number 1, Column 1:

I've tried doing the 'alternative' configuration and running the diagnostic output, but nothing changes.

The directions are pretty straight forward so I don't think I messed anything up...gave all the included files 777 and the sql seems to have gone fine. Any ideas?

I'm running OSC2.2rc2a...mods I'm using are ultimate seo urls, fancy lightbox, sts, ckeditor.

 

Any idea?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Hi Jack,

 

Thanks for the update, I'm running the latest version, four languages. Problem with multiple language links on sitemapspecials sorted, however same problem is now on categories:

 

sitemapcategories.xml

I have total of 8 categories, however sitemapcategories.xml shows four identical (all English language) links for each category, 32 links in total.

 

Looks like sitemap.class.php needs a little change around function GenerateCategorySitemap.


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

Quick question, I'm running my site on a webhosting addon slot (in other words the site is stored in a secondary folder in the root, with the domain pointing towards that folder),

I'm keep getting:

XML Parsing Error: no element found

Location: http://www.mysite.com/sitemapindex.xml

Line Number 1, Column 1:

I've tried doing the 'alternative' configuration and running the diagnostic output, but nothing changes.

The directions are pretty straight forward so I don't think I messed anything up...gave all the included files 777 and the sql seems to have gone fine. Any ideas?

I'm running OSC2.2rc2a...mods I'm using are ultimate seo urls, fancy lightbox, sts, ckeditor.

What are the results of the test?

Share this post


Link to post
Share on other sites

Thanks for the update, I'm running the latest version, four languages. Problem with multiple language links on sitemapspecials sorted, however same problem is now on categories:

 

sitemapcategories.xml

I have total of 8 categories, however sitemapcategories.xml shows four identical (all English language) links for each category, 32 links in total.

 

Looks like sitemap.class.php needs a little change around function GenerateCategorySitemap.

Hmm, that's strange. The only change that was made regarding the language was for the specials code. If the categories worked before, they should be working now. In googlesitemap/index.php you can try changing the line

$languages_id = $lng->language['id'];

to

$languages_id = X;

where X is the number ID of the language you want the map ran for.

Share this post


Link to post
Share on other sites

That works fine on sitemapspecials.xml however no change on sitemapcategories.xml, still 32 links like:

 

http://www.originalabsinthe.com/accessories-c-23.html
http://www.originalabsinthe.com/accessories-c-23.html
http://www.originalabsinthe.com/accessories-c-23.html
http://www.originalabsinthe.com/accessories-c-23.html
http://www.originalabsinthe.com/special-offers-c-24.html
http://www.originalabsinthe.com/special-offers-c-24.html
http://www.originalabsinthe.com/special-offers-c-24.html
http://www.originalabsinthe.com/special-offers-c-24.html
http://www.originalabsinthe.com/gift-vouchers-c-27.html
http://www.originalabsinthe.com/gift-vouchers-c-27.html
http://www.originalabsinthe.com/gift-vouchers-c-27.html
http://www.originalabsinthe.com/gift-vouchers-c-27.html


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

That works fine on sitemapspecials.xml however no change on sitemapcategories.xml, still 32 links like:

Try this. In googlesitemap/index.php, change

if ($google->GenerateCategorySitemap()){

to

if ($google->GenerateCategorySitemap($languages_id)){

And in googlesitemap/sitemap.class.php (or sitemap.class_Alternate.php) change

	function GenerateCategorySitemap(){
       $quotes = (defined('QUOTES_CATEGORY_NAME') ? " where cd.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : '');
	$sql = "SELECT c.categories_id as cID, c.date_added, c.last_modified as last_mod
		    FROM " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id
               " . $quotes . "
			ORDER BY c.parent_id ASC, c.sort_order ASC, c.categories_id ASC";

to

	function GenerateCategorySitemap($languages_id){
     $quotes = (defined('QUOTES_CATEGORY_NAME') ? " and cd.categories_name NOT LIKE '" . QUOTES_CATEGORY_NAME . "' " : '');
	$sql = "SELECT c.categories_id as cID, c.date_added, c.last_modified as last_mod
		    FROM " . TABLE_CATEGORIES . " c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id
		    where cd.language_id = " . (int)$languages_id . "
               " . $quotes . "
			ORDER BY c.parent_id ASC, c.sort_order ASC, c.categories_id ASC";

The products and manufacturers section will probably need to be changed in the same way, though you didn't mention duplicates for those.

Share this post


Link to post
Share on other sites

Hello There,

 

Quick question, I'm running my site on a webhosting addon slot (in other words the site is stored in a secondary folder in the root, with the domain pointing towards that folder),

I'm keep getting:

XML Parsing Error: no element found

Location: http://www.mysite.com/sitemapindex.xml

Line Number 1, Column 1:

I've tried doing the 'alternative' configuration and running the diagnostic output, but nothing changes.

The directions are pretty straight forward so I don't think I messed anything up...gave all the included files 777 and the sql seems to have gone fine. Any ideas?

I'm running OSC2.2rc2a...mods I'm using are ultimate seo urls, fancy lightbox, sts, ckeditor.

 

Any idea?

 

Thanks in advance.

What are the results of the test?

Hi Jack,

 

Hmm, in my ineptness I totally overlooked the gss.xsl file this morning. If this is what you're talking about the results are:

 

This XML file does not appear to have any style information associated with it. The document tree is shown below.

−
<!--
Google Sitmaps Stylesheets (GSStylesheets)
    Project Home: http://sourceforge.net/projects/gstoolbox
    Copyright (c) 2005 Baccou Bonneville SARL (http://www.baccoubonneville.com)
    License http://www.gnu.org/copyleft/lesser.html GNU/LGPL

    Created by Serge Baccou
    1.0 / 20 Aug 2005

    Changes by Johannes Müller (http://GSiteCrawler.com)
    1.1 / 20 Aug 2005 - sorting by clicking on column headers
                      - open urls in new window/tab 
                      - some stylesheet/CSS cleanup 
    1.5a/ 31 Aug 2005 - added version number in footer
                      - removed images (don't allow tracking on other servers)

    Changes by Tobias Kluge (http://enarion.net)
    1.2 / 22 Aug 2005 - moved sitemap file and sitemap index file into one file gss.xsl
 1.5 / 27 Aug 2005 - added js and css into xslt stylesheet; only gss.xsl is needed now

    Changes by Serge Baccou
    1.3 / 23 Aug 2005 - some XSLT cleanup
    1.4 / 24 Aug 2005 - sourceForge and LGPL links and logos
                      - sorting is working for siteindex (see gss.js) 
-->
−
<xsl:stylesheet version="2.0">
<xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/>
<!-- Root template -->
−
<xsl:template match="/">
−
<html>
−
<head>
<title>Google Sitemap File</title>
<link href="http://www.google.com/webmasters/sitemaps/docs/sitemaps.css" type="text/css" rel="stylesheet"/>
−
<style type="text/css">

		<!--
		h1 { 
			font-weight:bold;
			font-size:1.5em;
			margin-bottom:0;
			margin-top:1px; }

		h2 { 
			font-weight:bold;
			font-size:1.2em;
			margin-bottom:0; 
			color:#707070;
			margin-top:1px; }

		#gssTitle {
		  background: url(http://www.baccoubonneville.com/gss.jpg) no-repeat;   	
		  line-height: 70px;
		  text-indent: 70px; }

		p.sml { 
			font-size:0.8em;
			margin-top:0; }

		.sortup {
			background-position: right center;
			background-image: url(http://www.google.com/webmasters/sitemaps/images/sortup.gif);
			background-repeat: no-repeat;
			font-style:italic;
			white-space:pre; }

		.sortdown {
			background-position: right center;
			background-image: url(http://www.google.com/webmasters/sitemaps/images/sortdown.gif);
			background-repeat: no-repeat;
			font-style:italic;
			white-space:pre; }

		table.copyright {
			width:100%;
			border-top:1px solid #ddad08;
			margin-top:1em;
			text-align:center;
			padding-top:1em;
			vertical-align:top; }
		-->

</style>
−
<script language="JavaScript">

		var selectedColor = "blue";
		var defaultColor = "black";
		var hdrRows = 1;
		var numeric = '..';
		var desc = '..';
		var html = '..';
		var freq = '..';

		function initXsl(tabName,fileType) {
			hdrRows = 1;

		  if(fileType=="sitemap") {
		  	numeric = ".3.";
		  	desc = ".1.";
		  	html = ".0.";
		  	freq = ".2.";
		  	initTable(tabName);
			  setSort(tabName, 3, 1);
		  }
		  else {
		  	desc = ".1.";
		  	html = ".0.";
		  	initTable(tabName);
			  setSort(tabName, 1, 1);
		  }

			var theURL = document.getElementById("head1");
			theURL.innerHTML += ' ' + location;
			document.title += ': ' + location;
		}

		function initTable(tabName) {
		  var theTab = document.getElementById(tabName);
		  for(r=0;r<hdrRows;r++)
		   for(c=0;c<theTab.rows[r].cells.length;c++)
		     if((r+theTab.rows[r].cells[c].rowSpan)>hdrRows)
		       hdrRows=r+theTab.rows[r].cells[c].rowSpan;
		  for(r=0;r<hdrRows; r++){
		    colNum = 0;
		    for(c=0;c<theTab.rows[r].cells.length;c++, colNum++){
		      if(theTab.rows[r].cells[c].colSpan<2){
		        theCell = theTab.rows[r].cells[c];
		        rTitle = theCell.innerHTML.replace(/<[^>]+>| /g,'');
		        if(rTitle>""){
		          theCell.title = "Change sort order for " + rTitle;
		          theCell.onmouseover = function(){setCursor(this, "selected")};
		          theCell.onmouseout = function(){setCursor(this, "default")};
		          var sortParams = 15; // bitmapped: numeric|desc|html|freq
		          if(numeric.indexOf("."+colNum+".")>-1) sortParams -= 1;
		          if(desc.indexOf("."+colNum+".")>-1) sortParams -= 2;
		          if(html.indexOf("."+colNum+".")>-1) sortParams -= 4;
		          if(freq.indexOf("."+colNum+".")>-1) sortParams -= 8;
		          theCell.onclick = new Function("sortTable(this,"+(colNum+r)+","+hdrRows+","+sortParams+")");
		        }
		      } else {
		        colNum = colNum+theTab.rows[r].cells[c].colSpan-1;
		      }
		    }
		  }
		}

		function setSort(tabName, colNum, sortDir) {
			var theTab = document.getElementById(tabName);
			theTab.rows[0].sCol = colNum;
			theTab.rows[0].sDir = sortDir;
			if (sortDir) 
				theTab.rows[0].cells[colNum].className='sortdown'
			else
				theTab.rows[0].cells[colNum].className='sortup';
		}

		function setCursor(theCell, mode){
		  rTitle = theCell.innerHTML.replace(/<[^>]+>| |\W/g,'');
		  if(mode=="selected"){
		    if(theCell.style.color!=selectedColor) 
		      defaultColor = theCell.style.color;
		    theCell.style.color = selectedColor;
		    theCell.style.cursor = "hand";
		    window.status = "Click to sort by '"+rTitle+"'";
		  } else {
		    theCell.style.color = defaultColor;
		    theCell.style.cursor = "";
		    window.status = "";
		  }
		}

		function sortTable(theCell, colNum, hdrRows, sortParams){
		  var typnum = !(sortParams & 1);
		  sDir = !(sortParams & 2);
		  var typhtml = !(sortParams & 4);
		  var typfreq = !(sortParams & 8);
		  var tBody = theCell.parentNode;
		  while(tBody.nodeName!="TBODY"){
		    tBody = tBody.parentNode;
		  }
		  var tabOrd = new Array();
		  if(tBody.rows[0].sCol==colNum) sDir = !tBody.rows[0].sDir;
		  if (tBody.rows[0].sCol>=0)
		    tBody.rows[0].cells[tBody.rows[0].sCol].className='';
		  tBody.rows[0].sCol = colNum;
		  tBody.rows[0].sDir = sDir;
		  if (sDir) 
		  	 tBody.rows[0].cells[colNum].className='sortdown'
		  else 
		     tBody.rows[0].cells[colNum].className='sortup';
		  for(i=0,r=hdrRows;r<tBody.rows.length;i++,r++){
		    colCont = tBody.rows[r].cells[colNum].innerHTML;
		    if(typhtml) colCont = colCont.replace(/<[^>]+>/g,'');
		    if(typnum) {
		      colCont*=1;
		      if(isNaN(colCont)) colCont = 0;
		    }
		    if(typfreq) {
				switch(colCont.toLowerCase()) {
					case "always":  { colCont=0; break; }
					case "hourly":  { colCont=1; break; }
					case "daily":   { colCont=2; break; }
					case "weekly":  { colCont=3; break; }
					case "monthly": { colCont=4; break; }
					case "yearly":  { colCont=5; break; }
					case "never":   { colCont=6; break; }
				}
			}
		    tabOrd[i] = [r, tBody.rows[r], colCont];
		  }
		  tabOrd.sort(compRows);
		  for(i=0,r=hdrRows;r<tBody.rows.length;i++,r++){
		    tBody.insertBefore(tabOrd[i][1],tBody.rows[r]);
		  } 
		  window.status = ""; 
		}

		function compRows(a, B){
		  if(sDir){
		    if(a[2]>b[2]) return -1;
		    if(a[2]<b[2]) return 1;
		  } else {
		    if(a[2]>b[2]) return 1;
		    if(a[2]<b[2]) return -1;
		  }
		  return 0;
		}


</script>
</head>
−
<!--
Store in $fileType if we are in a sitemap or in a siteindex 
-->
−
<xsl:variable name="fileType">
−
<xsl:choose>
<xsl:when test="//sitemap:url">sitemap</xsl:when>
<xsl:otherwise>siteindex</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Body -->
−
<body onLoad="initXsl('table0','{$fileType}');">
<!-- Text and table -->
<h1 id="head1">Google Sitemap</h1>
−
<xsl:choose>
−
<xsl:when test="$fileType='sitemap'">
<xsl:call-template name="sitemapTable"/>
</xsl:when>
−
<xsl:otherwise>
<xsl:call-template name="siteindexTable"/>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template>
<!-- siteindexTable template -->
−
<xsl:template name="siteindexTable">
−
<h2>
Number of sitemaps in this Google sitemap index: 
<xsl:value-of select="count(sitemap:sitemapindex/sitemap:sitemap)"/>
</h2>
<p class="sml">Click on the table headers to change sorting.</p>
−
<table border="1" width="100%" class="data" id="table0">
−
<tr class="header">
<td>Sitemap URL</td>
<td>Last modification date</td>
</tr>
−
<xsl:apply-templates select="sitemap:sitemapindex/sitemap:sitemap">
<xsl:sort select="sitemap:lastmod" order="descending"/>
</xsl:apply-templates>
</table>
</xsl:template>
<!-- sitemapTable template -->
−
<xsl:template name="sitemapTable">
−
<h2>
Number of URLs in this Google Sitemap: 
<xsl:value-of select="count(sitemap:urlset/sitemap:url)"/>
</h2>
<p class="sml">Click on the table headers to change sorting.</p>
−
<table border="1" width="100%" class="data" id="table0">
−
<tr class="header">
<td>Sitemap URL</td>
<td>Last modification date</td>
<td>Change freq.</td>
<td>Priority</td>
</tr>
−
<xsl:apply-templates select="sitemap:urlset/sitemap:url">
<xsl:sort select="sitemap:priority" order="descending"/>
</xsl:apply-templates>
</table>
</xsl:template>
<!-- sitemap:url template -->
−
<xsl:template match="sitemap:url">
−
<tr>
−
<td>
−
<xsl:variable name="sitemapURL">
<xsl:value-of select="sitemap:loc"/>
</xsl:variable>
−
<a href="{$sitemapURL}" target="_blank" ref="nofollow">
<xsl:value-of select="$sitemapURL"/>
</a>
</td>
−
<td>
<xsl:value-of select="sitemap:lastmod"/>
</td>
−
<td>
<xsl:value-of select="sitemap:changefreq"/>
</td>
−
<td>
<xsl:value-of select="sitemap:priority"/>
</td>
</tr>
</xsl:template>
<!-- sitemap:sitemap template -->
−
<xsl:template match="sitemap:sitemap">
−
<tr>
−
<td>
−
<xsl:variable name="sitemapURL">
<xsl:value-of select="sitemap:loc"/>
</xsl:variable>
−
<a href="{$sitemapURL}">
<xsl:value-of select="$sitemapURL"/>
</a>
</td>
−
<td>
<xsl:value-of select="sitemap:lastmod"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>

If not, tell me how to run the test.

 

Thanks man.

Edited by theoiks

Share this post


Link to post
Share on other sites

Hmm, in my ineptness I totally overlooked the gss.xsl file this morning. If this is what you're talking about the results are:

No, that's not what I meant.

If not, tell me how to run the test.

See step 5 in the installation instructions.

Share this post


Link to post
Share on other sites

The products and manufacturers section will probably need to be changed in the same way, though you didn't mention duplicates for those.

Thank you very much, that works just fine on both sitemapcategories.xml and sitemapspecials.xml. I see no problem on the products section and I'm not using manufacturers.


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

No, that's not what I meant.

See step 5 in the installation instructions.

Jack, just to follow up, my apologies; LOL, I had been awake for nearly 3 days straight making the website/adding contributions and didn't think to look inside the googlesitmaps folder..I was just going by the readme and didn't read step 5 correctly. Works Great! Thank you for your replies and putting this contribution together. Terrific.

Edited by theoiks

Share this post


Link to post
Share on other sites

Hi Jack,

 

I have google xml seo v1.4 and it works returning seo urls (but im using another urls seo contrib).

 

When i tried to update to v1.5 it works well, except the urls aren't seo they are cpath.

 

What do you think is better for SEO pourposes:

 

stay with the slightly hacked version of v1.4 (displaying seo urls)

 

or

 

install v1.5 without deprecated commands and fully working for multilanguage hence i can submit for all languages (with the disadvantage of cpath urls, since i can't make seo urls work in this version)

Share this post


Link to post
Share on other sites

Hi Jack,

 

I have google xml seo v1.4 and it works returning seo urls (but im using another urls seo contrib).

 

When i tried to update to v1.5 it works well, except the urls aren't seo they are cpath.

 

What do you think is better for SEO pourposes:

 

stay with the slightly hacked version of v1.4 (displaying seo urls)

 

or

 

install v1.5 without deprecated commands and fully working for multilanguage hence i can submit for all languages (with the disadvantage of cpath urls, since i can't make seo urls work in this version)

I can't think of a reason why this version would cause your url contribution to stop working. Maybe the url contributions cache needs to be cleared? You need to have matching url's though. If you want to stick with the url rewriter you are using, then you, apparently, don't have a choice but to use the older version. The problem is that this contribution will continue to change with newer versions that may have something you need. Even now, if your host upgrades to php 5.3, the version you are using will fail. So, in my opinion, you need to be able to upgrade. In the meantime though, stick with the older version so that the url's match.

Share this post


Link to post
Share on other sites

I can't think of a reason why this version would cause your url contribution to stop working. Maybe the url contributions cache needs to be cleared? You need to have matching url's though. If you want to stick with the url rewriter you are using, then you, apparently, don't have a choice but to use the older version. The problem is that this contribution will continue to change with newer versions that may have something you need. Even now, if your host upgrades to php 5.3, the version you are using will fail. So, in my opinion, you need to be able to upgrade. In the meantime though, stick with the older version so that the url's match.

 

Hi Jack,

 

I suppose I'm in the same boat where I'm going to have to use v1.4 since I have USU5. The rewriting doesn't fail per se on my site but it does generate sitemaps that have unrewritten urls. I looked at the changes you made with winmerge and it looks like the one change that might apply to me would be replacing ereg calls with preg ones. What benefit might I get by manually making those changes? Version 1.4 works great for me given the other contributions I have installed (no quotes, no article manager, no page manager) so could I just leave well enough alone for now? And if my host upgrades to php 5.3, are you saying that google xml sitemap seo v1.4 will fail or the latest version of USU5 or both?

 

Thanks,

 

Nick

Share this post


Link to post
Share on other sites

I suppose I'm in the same boat where I'm going to have to use v1.4 since I have USU5. The rewriting doesn't fail per se on my site but it does generate sitemaps that have unrewritten urls. I looked at the changes you made with winmerge and it looks like the one change that might apply to me would be replacing ereg calls with preg ones. What benefit might I get by manually making those changes? Version 1.4 works great for me given the other contributions I have installed (no quotes, no article manager, no page manager) so could I just leave well enough alone for now? And if my host upgrades to php 5.3, are you saying that google xml sitemap seo v1.4 will fail or the latest version of USU5 or both?

There's no advantage to use preg-type calls in this contribution. But ereg-type calls will not work at all under 5.3 and all contributions are being converted since the time will come when everyone will have to update. Any ereg-type code in your shop, of which there is a lot, will completely fail once your host switches to 5.3. You can do a search of the forums for ereg for more information.

Share this post


Link to post
Share on other sites

Edited**

 

nm figured out what my problem was..... :P

Edited by MrE03

Share this post


Link to post
Share on other sites

it just shows me the documentation but doesn't do anything

 

what am I doing wrong?

I get a 404 error for that link so it doesn't seem to be installed.

Share this post


Link to post
Share on other sites

I get a 404 error for that link so it doesn't seem to be installed.

i didn't put the real domain

 

if it helps the real domain is

http://www.k oshe rkasua l.com/googles itemap/

(please remove spaces)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×