Zen Cart Logo

SitemapXML v.2

Views: 613,529

Results 921 to 940 of 2,226
7 May 2012, 9:46 AM
#921
reikipaul avatar

reikipaul

New Zenner

Join Date:
May 2012
Posts:
2
Plugin Contributions:
0

SitemapXML v.2

Hi,
Quote Originally Posted by reikipaul View Post
Hi.

I have just installed SitemapXML on Zencart 1.5 and the sitemapezpages.xml file is blank. The index, mainpage, products and categories have all been filled in during the installation but the ezpages xml file and the other ones are left blank. I have chmodded the .xml files to 777 but it still wont work.

My site is:

http://healing-exchange.com
I don't found any EZpages on your site.

I figured out the problem. Thanks. I had set up links to my forum and link exchange and had them set as external url's. I have now changed it to internal url's and it is now working fine. Thanks. What you said got me to think about that. It makes sense that the sitemap generator wouldn't pick up external links.

14 May 2012, 3:36 PM
#922
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: SitemapXML v.2

I have the /cgi-bin file being executed regularly as a cron job.
The script creates the sitemaps correctly but it generates a debug error every time.

[13-May-2012 01:00:01] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in /home/xxxx/public_html/tienda/includes/functions/sessions.php on line 113
[13-May-2012 01:00:01] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in /home/xxxx/public_html/tienda/includes/functions/sessions.php on line 113

While it appears that the usual cause of such an error is a line after the closing php tag, these files don't have closing tags.
I have checked that the files are identical to the install ones, no extra spaces or lines at the end.

Any clues?

14 May 2012, 4:24 PM
#923
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

torvista:

I have the /cgi-bin file being executed regularly as a cron job.
The script creates the sitemaps correctly but it generates a debug error every time.

While it appears that the usual cause of such an error is a line after the closing php tag, these files don't have closing tags.
I have checked that the files are identical to the install ones, no extra spaces or lines at the end.

Any clues?

Check your files. You can use my script found_extra_space.

14 May 2012, 11:02 PM
#924
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: SitemapXML v.2

Great script!

It found half a dozen files which I corrected.
...including
/includes/templates/template_default/sitemapxml/html_header.php

which I had previously ignored due to the comment at the end.

However, removing the final line has not cured the debug error.

regards
Steve

15 May 2012, 6:37 AM
#925
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

torvista:

...including
/includes/templates/template_default/sitemapxml/html_header.php

which I had previously ignored due to the comment at the end.

However, removing the final line has not cured the debug error.
Of course, because html_header.php actually displays the information. But it happens much later start sessions.

It is strange that the error message does not indicate the place where the output header starts.

In addition, the script /cgi-bin/sitemapxml.php buffers (ob_start()) all output before starting the main wrapper index.php. This means that the presence of extra-Space should not affect the output header.

Perhaps there are some features of php-scripts run through Cron. As you run, what is written in the crown?
Show your script /cgi-bin/sitemapxml.php here.

15 May 2012, 8:49 AM
#926
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: SitemapXML v.2

As you run, what is written in the crown?

Do you mean what is the Cron command?:

php -q /home/xxxx/public_html/tienda/cgi-bin/sitemapxml.php rebuild=yes ping=yes

The sitemapxml

<?php
/**
 * Sitemap XML Feed
 *
 * @package Sitemap XML Feed
 * @copyright Copyright 2005-2010, Andrew Berezin eCommerce-Service.com
 * @copyright Portions Copyright 2003-2008 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @link http://www.sitemaps.org/
 * @version $Id: sitemapxml.php, v 2.1.1 21.10.2011 11:16:35 AndrewBerezin $
 */
// php -f /home/XXXXXXX/domains/XXXX.ru/public_html/cgi-bin/sitemapxml.php rebuild=yes ping=yes
// /usr/local/bin/php -f /home/XXXXXXX/data/www/XXXX.ru/cgi-bin/sitemapxml.php rebuild=yes ping=yes

if (!is_file(dirname(__FILE__) . '/includes/configure.php')) {
  chdir(dirname(__FILE__) . '/../');
} else {
  chdir(dirname(__FILE__));
}

if ((!isset($_GET) || sizeof($_GET) == 0) && isset($_SERVER['argc']) && sizeof($_SERVER['argv']) > 1) {
  for($i=1,$n=sizeof($_SERVER['argv']); $i<$n; $i++) {
    list($key, $val) = explode('=', $_SERVER['argv'][$i]);
    $_GET[$key] = $_REQUEST[$key] = $val;
  }
}

if (!isset($_SERVER['REQUEST_URI'])) $_SERVER['REQUEST_URI'] = '/' . basename($_SERVER['SCRIPT_NAME']);
if (!isset($_SERVER['HTTP_HOST'])) $_SERVER['HTTP_HOST'] = '';
if (!isset($_SERVER['REMOTE_ADDR'])) $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
if (!isset($_SERVER['HTTP_USER_AGENT'])) $_SERVER['HTTP_USER_AGENT'] = 'Cron /usr/local/bin/php -f ';

$_GET['main_page'] = 'sitemapxml';

function zen_sitemapxml_callback($html) {
  $html = str_replace(' ', ' ', $html);
  $html = preg_replace('@\s\s+@', ' ', $html);
  $html = preg_replace('@<head>(.*)</'.'head>@si', '', $html);
  $html = preg_replace('@<script(.*)</'.'script>@si', '', $html);
  $html = preg_replace('@<title>(.*)</'.'title>@si', '', $html);
  $html = preg_replace('@(</h[1-4]>)@si', "$1\n", $html);
  $html = preg_replace('@(<h[1-4]>|<div)@si', "\n$1", $html);
  $html = preg_replace('@(<br\s*[/]*>|<p.*>|</p>|</div>|</h\d+>)@si', "$1\n", $html);
  $html = preg_replace("@\n\s+@", "\n", $html);
  $html = strip_tags($html);
  $html = trim($html);
  return $html;
}
ob_start('zen_sitemapxml_callback');

include('index.php');

I've asked my hosting for the error log as I can't duplicate this locally.

15 May 2012, 9:23 AM
#927
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

torvista:

Do you mean what is the Cron command?:
...
The sitemapxml
...

I've asked my hosting for the error log as I can't duplicate this locally.
Everything looks normal.

16 May 2012, 4:41 PM
#928
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: SitemapXML v.2

Can you tell me how to make it so that products that I have temporarily turned off, will not show up on the sitemap? I am using 1.3.8 and just upgraded to the latest for that version. Thanks!

16 May 2012, 4:55 PM
#929
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

Doodlebuckets:

Can you tell me how to make it so that products that I have temporarily turned off, will not show up on the sitemap? I am using 1.3.8 and just upgraded to the latest for that version. Thanks!

What do you mean "temporarily turned off"?

16 May 2012, 6:08 PM
#930
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: SitemapXML v.2

a_berezin:

What do you mean "temporarily turned off"?

Well, I have a dozen products or so that I am waiting to hear from the supplier if they will need to be discontinued or not. This situation happens quite often to me. So I have them turned of in the admin, not to show up on the site, but they still appear on the sitemap. And they are broken links from there and that is not good SEO. So wondering if there is a fix for that. Thanks for your quick reply :)
Amy

16 May 2012, 9:52 PM
#931
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

Doodlebuckets:

Well, I have a dozen products or so that I am waiting to hear from the supplier if they will need to be discontinued or not. This situation happens quite often to me. So I have them turned of in the admin, not to show up on the site, but they still appear on the sitemap. And they are broken links from there and that is not good SEO. So wondering if there is a fix for that. Thanks for your quick reply :)
Amy
No, no, no. SitemapXML shows only active products.
If you see in the sitemapproducts.xml non active products, it means only one thing - you are not updated Sitemap.

16 May 2012, 10:24 PM
#932
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: SitemapXML v.2

a_berezin:

No, no, no. SitemapXML shows only active products.
If you see in the sitemapproducts.xml non active products, it means only one thing - you are not updated Sitemap.

But I just updated today to the latest for 1.3.8. Shouldn't that have fixed it?

17 May 2012, 6:15 AM
#933
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

Doodlebuckets:

But I just updated today to the latest for 1.3.8. Shouldn't that have fixed it?
Update xml-map - sitemapproducts.xml, not a script SitemapXML. Once more - SitemapXML shows only active products.

What do you mean by "latest for 1.3.8"? Which version SitemapXML are you using?

17 May 2012, 3:18 PM
#934
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: SitemapXML v.2

a_berezin:

Update xml-map - sitemapproducts.xml, not a script SitemapXML. Once more - SitemapXML shows only active products.

What do you mean by "latest for 1.3.8"? Which version SitemapXML are you using?

I used to the last revision that said it was complatible with 1.3.8 since I am not using 1.5. I noticed yesterday that I had both Google Sitemap and Sitemap XML in my Configuration. How do I uninstall the old one and have only the newest mod?

17 May 2012, 4:01 PM
#935
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

Doodlebuckets:

I used to the last revision that said it was complatible with 1.3.8 since I am not using 1.5.
I can not help you - you do not even want to answer a simple question: "Which version do you use?" Apparently you're working with some of the old, unsupported version.

And who told you that the latest version only works on 1.5?

Doodlebuckets:

I noticed yesterday that I had both Google Sitemap and Sitemap XML in my Configuration. How do I uninstall the old one and have only the newest mod?
Uninstall all versions, download latest version and install it.

17 May 2012, 4:16 PM
#936
doodlebuckets avatar

doodlebuckets

Totally Zenned

Join Date:
Jul 2005
Posts:
497
Plugin Contributions:
0

Re: SitemapXML v.2

a_berezin:

I can not help you - you do not even want to answer a simple question: "Which version do you use?" Apparently you're working with some of the old, unsupported version.

And who told you that the latest version only works on 1.5?

Uninstall all versions, download latest version and install it.

SitemapXML (formerly "Google Sitemap") - Version: 2.1.0 is the latest version that says it is compatible with 1.3.8. Later versions say they are for 1.5. If you are saying that I can use the 1.5 compatible versions, then I am happy to do that. When I use the uninstall SQL, it only uninstalls the Sitemap XML, but leaves the old Google SiteMap configuration in place.

17 May 2012, 4:56 PM
#937
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

Doodlebuckets:

Later versions say they are for 1.5.
Really? As I see, you don't read forum and readme.txt :(

Doodlebuckets:

When I use the uninstall SQL, it only uninstalls the Sitemap XML, but leaves the old Google SiteMap configuration in place.
For uninstall Google SiteMap use uninstall sql from Google SiteMap!!!

19 May 2012, 10:17 PM
#938
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: SitemapXML v.2

I can't get any further information regarding the error from the hosting server logs.
An odd thing is that if I manually run the cgi-bin file by typing the address in the browser, it does not cause the error.

Although I don't get this error when testing locally, while looking for more clues I found these warnings:

[19-May-2012 22:54:00] PHP Notice:  Undefined variable: date in D:\My Documents\Business\SHOP\includes\classes\sitemapxml.php on line 126
[19-May-2012 22:54:00] PHP Notice:  Trying to get property of non-object in D:\My Documents\Business\SHOP\includes\modules\pages\sitemapxml\sitemapxml_homepage.php on line 16
[19-May-2012 22:54:00] PHP Notice:  Trying to get property of non-object in D:\My Documents\Business\SHOP\includes\modules\pages\sitemapxml\sitemapxml_homepage.php on line 23
[19-May-2012 22:54:00] PHP Notice:  Trying to get property of non-object in D:\My Documents\Business\SHOP\includes\modules\pages\sitemapxml\sitemapxml_homepage.php on line 23

I understand they are probably not important...

20 May 2012, 10:22 AM
#939
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: SitemapXML v.2

Hi Steve,

torvista:

I can't get any further information regarding the error from the hosting server logs.
An odd thing is that if I manually run the cgi-bin file by typing the address in the browser, it does not cause the error.
I do not know what to advise :(

torvista:

Although I don't get this error when testing locally, while looking for more clues I found these warnings:

[19-May-2012 22:54:00] PHP Notice: Undefined variable: date in D:\My Documents\Business\SHOP\includes\classes\sitemapxml.php on line 126
[19-May-2012 22:54:00] PHP Notice: Trying to get property of non-object in D:\My Documents\Business\SHOP\includes\modules\pages\sitemapxml\sitemapxml_homepage.php on line 16
[19-May-2012 22:54:00] PHP Notice: Trying to get property of non-object in D:\My Documents\Business\SHOP\includes\modules\pages\sitemapxml\sitemapxml_homepage.php on line 23
[19-May-2012 22:54:00] PHP Notice: Trying to get property of non-object in D:\My Documents\Business\SHOP\includes\modules\pages\sitemapxml\sitemapxml_homepage.php on line 23

> 
> I understand they are probably not important...
These bug fixes in the latest version 3.2.2. If you want to - try the latest version. But do not think it will affect the error 'headers already sent".
20 May 2012, 10:35 AM
#940
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: SitemapXML v.2

These bug fixes in the latest version 3.2.2

Thanks, where do I find that, I see 3.1 as the latest download.