Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo


Guest

Recommended Posts

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

 

XML document must have a top level element. Error processing resource 'http://yaddayaddyadd.com/sitemapindex.xml'.

Thats the same error I'm getting after playing catchup with this thread.

Edited by Custom-Home-Theater
Link to comment
Share on other sites

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

 

XML document must have a top level element. Error processing resource 'http://www.kitchenniche.ca/sitemapindex.xml'.

 

In the "catalog/includes/boxes/categories.php " look around line 37 for this

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
     $categories_string .= '</b>';
   }

 

And change it to this

 

if (isset($cPath_array) && @in_array($counter, $cPath_array)) {
     $categories_string .= '</b>';
   }

 

That will fix the XML problem --WILL your the one that found it, but had to go digging alittle bit more in order to find the spot.

 

Thanks for eveyone who's put alot of time into this.

Link to comment
Share on other sites

I am also getting this problem and I have changed the code as stated above but still get the same error. Any other suggetions would be greatly appreciated.

 

 

All the answers are in this thread to make this work, I back tracked in this thread & then looked at the step by step that came with the XML files.

Link to comment
Share on other sites

Please could someone help I have realised now what the problem is and it may not be a problem I just dont know.

 

Anyway the whole time I was trying to open the files as it states in the instuctions which is

 

www.mysite.co.uk/sitemapindex.xml

www.mysite.co.uk/sitemapproducts.xml

www.mysite.co.uk/sitemapcategories.xml

 

Which had not been working and giving the problems I quoted in the forum earlier but I have just notice that it was not loading them because is has actually created different files which will load.

 

www.mysite.co.uk/googlesitemapsitemapindex.xml

www.mysite.co.uk/googlesitemapsitemapproducts.xml

www.mysite.co.uk/googlesitemapsitemapcategories.xml

 

As the filenames are different to what it states in the instructions will this affect any thing with the sitemap also should I delete out the files that dont work.

 

www.mysite.co.uk/sitemapindex.xml

www.mysite.co.uk/sitemapproducts.xml

www.mysite.co.uk/sitemapcategories.xml

 

If it doesnt make any difference them I will just go ahead a submit it.

Link to comment
Share on other sites

  • 2 weeks later...

Hey Chemo

 

I ran the contrib and it worked straight away, no problems - just uploaded and ran!

 

I have used the sitemaps for my own site before (not e-commerce) and was surprised at how well it worked. This is worth doing - it means less work for GoogleBot and Google likes to help those who help them.

 

Thanks for contrib!

 

 

Sebastian Grant

BeetleJoose Media

Edited by beetlejoose
Link to comment
Share on other sites

Please could someone help I have realised now what the problem is and it may not be a problem I just dont know.

 

Anyway the whole time I was trying to open the files as it states in the instuctions which is

 

www.mysite.co.uk/sitemapindex.xml

www.mysite.co.uk/sitemapproducts.xml

www.mysite.co.uk/sitemapcategories.xml

 

Which had not been working and giving the problems I quoted in the forum earlier but I have just notice that it was not loading them because is has actually created different files which will load.

 

www.mysite.co.uk/googlesitemapsitemapindex.xml

www.mysite.co.uk/googlesitemapsitemapproducts.xml

www.mysite.co.uk/googlesitemapsitemapcategories.xml

 

As the filenames are different to what it states in the instructions will this affect any thing with the sitemap also should I delete out the files that dont work.

 

www.mysite.co.uk/sitemapindex.xml

www.mysite.co.uk/sitemapproducts.xml

www.mysite.co.uk/sitemapcategories.xml

 

If it doesnt make any difference them I will just go ahead a submit it.

 

 

On one of my sites, it works the way the instructions state. On the other, it works the same way yours does. I'm going to go ahead and submit them like they are, with the googlesitemapsitemapindex.xml name.

 

Did yours work for you?

Link to comment
Share on other sites

Too all with the problem where your files get referenced by the script like this:

googlesitemapsitemapindex.xml

instead of like this:

sitemapindex.xml

 

I believe I've found the problem.

 

Look in your catalog/includes/configure.php for a line that looks like this:

  define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

 

Change it to look like this:

//  define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
 define('DIR_FS_CATALOG', '/home/your_username/the_rest_of_your_path/catalog/');

 

That fixed this problem for me on one of my servers.

 

-jared

Link to comment
Share on other sites

Hi Bobby,

I loaded your excellent contrib with no problems. Just wondering if this is the way it should display? (I have your Ultimate URLs installed and deleted the temp file like I do when adding new products which normally corrects the url listing to the product name) This however is still displaying the default osC names and not the Ultimate SEO (product) names.

 

Here's a clip...

<?xml version="1.0" encoding="UTF-8" ?> 
- <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
- <url>
 <loc>http://www.gokartsrus.com/product_info.php?products_id=1876</loc> 
 <lastmod>2005-07-16</lastmod> 
 <changefreq>weekly</changefreq> 
 <priority>1.0</priority> 
 </url>
- <url>
 <loc>http://www.gokartsrus.com/product_info.php?products_id=4815</loc> 
 <lastmod>2005-05-06</lastmod> 
 <changefreq>weekly</changefreq> 
 <priority>0.8</priority> 
 </url>
- <url>
 <loc>http://www.gokartsrus.com/product_info.php?products_id=4766</loc> 
 <lastmod>2005-02-08</lastmod> 
 <changefreq>weekly</changefreq> 
 <priority>0.5</priority> 
 </url>
- <url>
 <loc>http://www.gokartsrus.com/product_info.php?products_id=4818</loc> 
 <lastmod>2005-08-18</lastmod> 
 <changefreq>weekly</changefreq> 
 <priority>0.4</priority> 
 </url>
- <url>
 <loc>http://www.gokartsrus.com/product_info.php?products_id=4669</loc> 
 <lastmod>2005-04-04</lastmod> 
 <changefreq>weekly</changefreq> 
 <priority>0.4</priority> 
 </url>

 

Your insight is appreciated.

Thanks, KJ

define('PROJECTS', 'Something that goes on forever!');

Link to comment
Share on other sites

I have pages on the site that don't have anything to do with catalog or products, I want to add that part to xml layout but I'm not sure how to go about it, can someone help? I'm using the calendar contrib and want that to also be indexed.

Link to comment
Share on other sites

I have pages on the site that don't have anything to do with catalog or products,  I want to add that part to xml layout but I'm not sure how to go about it, can someone help?  I'm using the calendar contrib and want that to also be indexed.

I managed finally to solve this with a semi-handy but working solution

 

http://www.oscommerce.com/forums/index.php?showtopic=170307

 

dahui

Link to comment
Share on other sites

Is there a way to set the Priority minimum from a 0.1 to something like a 0.3? I am not real sure on the importance of the priority code, but most of my product pages get a 0.1 when I look at sitemapproducts.xml, and they are already indexed well in Google. If I submit them with the 0.1, will they drop lower on the search for the item? I hope not. That is why I would like to change the priority default minimum. Can anyone shed some light on this and provide the way to change the minimum?

Laser labels, barcode labels, custom labels

Link to comment
Share on other sites

I have some problems with this contribution, I get this error:-

 

 

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 571 is not allowed to access /home/virtual/site57/fst/var/www/html/sitemapproducts.xml owned by uid 513 in /home/virtual/site23/fst/var/www/html/googlesitemap/sitemap.class.php on line 291

 

Warning: fopen(/home/virtual/site57/fst/var/www/html/sitemapproducts.xml): failed to open stream: Success in /home/virtual/site23/fst/var/www/html/googlesitemap/sitemap.class.php on line 291

ERROR: Google Product Sitemap Generation FAILED!

 

 

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 571 is not allowed to access /home/virtual/site57/fst/var/www/html/sitemapcategories.xml owned by uid 513 in /home/virtual/site23/fst/var/www/html/googlesitemap/sitemap.class.php on line 291

 

Warning: fopen(/home/virtual/site57/fst/var/www/html/sitemapcategories.xml): failed to open stream: Success in /home/virtual/site23/fst/var/www/html/googlesitemap/sitemap.class.php on line 291

ERROR: Google Category Sitemap Generation FAILED!

 

 

Warning: glob(): SAFE MODE Restriction in effect. The script whose uid is 571 is not allowed to access /home/virtual/site57/fst/var/www/html/sitemapcategories.xml owned by uid 513 in /home/virtual/site23/fst/var/www/html/googlesitemap/sitemap.class.php on line 372

 

Warning: Invalid argument supplied for foreach() in /home/virtual/site23/fst/var/www/html/googlesitemap/sitemap.class.php on line 372

 

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 571 is not allowed to access /home/virtual/site57/fst/var/www/html/sitemapindex.xml owned by uid 513 in /home/virtual/site23/fst/var/www/html/googlesitemap/sitemap.class.php on line 291

 

Warning: fopen(/home/virtual/site57/fst/var/www/html/sitemapindex.xml): failed to open stream: Success in /home/virtual/site23/fst/var/www/html/googlesitemap/sitemap.class.php on line 291

ERROR: Google Sitemap Index Generation FAILED!

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 1979

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 114

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /home/virtual/site57/fst/var/www/html/sitemapproducts.xml

[status] => failure

[file_exists] => false

)

 

[1] => Array

(

[file] => /home/virtual/site57/fst/var/www/html/sitemapcategories.xml

[status] => failure

[file_exists] => false

)

 

[2] => Array

(

[file] => /home/virtual/site57/fst/var/www/html/sitemapindex.xml

[status] => failure

[file_exists] => false

)

 

)

 

)

 

 

I then did this in gogglesitemap/index.php (the comments)

 

/*if ( file_exists(DIR_WS_CLASSES . 'seo.class.php') ){

require_once(DIR_WS_CLASSES . 'seo.class.php');

$seo_urls = new SEO_URL($languages_id);

}

 

require_once(DIR_WS_FUNCTIONS . 'html_output.php');

 

if ( file_exists(DIR_WS_CLASSES . 'cache.class.php') ){

include(DIR_WS_CLASSES . 'cache.class.php');

$cache = new cache($languages_id);

if ( file_exists('includes/seo_cache.php') ){

include('includes/seo_cache.php');

}

$cache->get_cache('GLOBAL');

}*/

 

Then i got this error:-

 

Fatal error: Call to undefined function: tep_href_link() in /home/virtual/site23/fst/var/www/html/googlesitemap/sitemap.class.php on line 548

 

Can someone plese help?

 

Jai

Link to comment
Share on other sites

  • 3 weeks later...

Hi all

 

This contribution was working fine and the xml files were/are generated and fed to Google OK.

Or so i thought. I have just set up a new site and thought i'd set up the sitemap for this, so i go to my google admin and see that the file for my older site is uploading with errors. On checking i get the same error when i call any of the xml files in my address bar. The files are actually generated (if you look in them (ftp)).; The error i get on all the files is:-

Parse error: parse error, unexpected T_STRING in /home/julianp/public_html/sitemapindex.xml on line 1

LIne 1 on all the files is <?xml version="1.0" encoding="UTF-8"?>

MY site is HERE

 

I have no idea how long it has been like this as i get the cron e:mail saying all files generated and uploaded OK.

Any help on this appreciated.

TIA

 

Julian

A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Link to comment
Share on other sites

I installed version 1.4, then read somewhere that if I have SEO installed I should use 1.3.....so changed. But either way I get this:

 

ERROR: Google Product Sitemap Generation FAILED!

 

ERROR: Google Category Sitemap Generation FAILED!

 

Generated Google Sitemap Index Successfully

 

I read in the first pages of someone having about the same problem (they got all 3 errors), but I never really found an answer to fix it. I'm guessing since one was successful....it's just a small thing....but have no clue.

 

Thanks for your help....my contacts are completely dried out by reading all these pages looking for an answer (and I'm just sure it right there....I'm just blind)

Link to comment
Share on other sites

Can you post the entire error page you get? You can *** out the specific file paths if you like, but the rest of the error screen will probably help.

 

-jared

Link to comment
Share on other sites

Can you post the entire error page you get? You can *** out the specific file paths if you like, but the rest of the error screen will probably help.

 

-jared

 

ERROR: Google Product Sitemap Generation FAILED!

 

ERROR: Google Category Sitemap Generation FAILED!

 

Generated Google Sitemap Index Successfully

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 0

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 0

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /home/webbsgra/public_html/decals/sitemapindex.xml

[status] => success

[file_exists] => true

)

 

)

 

)

 

 

Thanks for looking

Link to comment
Share on other sites

Hi,

 

I'm trying to install the program and am getting this error:

 

Warning: main(includes/configure.php): failed to open stream: No such file or directory in /home/content/m/j/k/mjk234/html/googlesitemap/index.php on line 38

 

Fatal error: main(): Failed opening required 'includes/configure.php' (include_path='.:/usr/local/lib/php') in /home/content/m/j/k/mjk234/html/googlesitemap/index.php on line 38

I'm no programmer, so I don't know what this means. Someone please help!

 

Matt

I'm also getting a similar message from my CRON email. It reads:

Failed loading /usr/local/lib/ioncube_loader_lin_4.4.so: /usr/local/lib/ioncube_loader_lin_4.4.so: undefined symbol: ap_php_vsnprintf

 

Warning: main(includes/configure.php): failed to open stream: No such file or directory in /hsphere/local/home/dwdobbs/sitisgallery.com/catalog/googlesitemap/index.php on line 46

 

Fatal error: main(): Failed opening required 'includes/configure.php' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/dwdobbs/sitisgallery.com/catalog/googlesitemap/index.php on line 46

For me, running the index.php sitemap.xml generator from my browser works fine. And it seems to work fine for Google. Just my CRON job is hosed.

 

I have looked all over the Forum, but can't find an answer to this. I am reasonbly sure it is a path problem, but I don't know where. Anyone know an answer?

Link to comment
Share on other sites

Hi all

 

This contribution was working fine and the xml files were/are generated and fed to Google OK.

Or so i thought. I have just set up a new site and thought i'd set up the sitemap for this, so i go to my google admin and see that the file for my older site is uploading with errors. On checking i get the same error when i call any of the xml files in my address bar. The files are actually generated (if you look in them (ftp)).; The error i get on all the files is:-

 

LIne 1 on all the files is <?xml version="1.0" encoding="UTF-8"?>

MY site is HERE

 

I have no idea how long it has been like this as i get the cron e:mail saying all files generated and uploaded OK.

Any help on this appreciated.

TIA

 

Julian

 

I've reinstalled this on both my sites. The new sitemap loads and works fine on the new site, but still get the above errors on my old site. Really don't get it. Any ideas on why this would error on line 1??? with the same loaded on both sites. One works one doesn't???

 

Cheers

 

Julian

A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Link to comment
Share on other sites

Chemo

 

Here is a quick fix for SEF Lite users. It also adds the option to track your indexed links. Open the file 'sitemap.class.php' and...

 

Find this on line 402:

$location = $this->hrefLink(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false);

and replace it with:

$location = $this->hrefLink('product' . $result['pID'] . FILENAME_PRODUCT_INFO, 'source=google', 'NONSSL', false);
Then find this on line 447:

$location = $this->hrefLink(FILENAME_DEFAULT, 'cPath=' . $this->GetFullcPath($result['cID']), 'NONSSL', false);

and replace it with:

$location = $this->hrefLink('category' . $this->GetFullcPath($result['cID']) . FILENAME_DEFAULT, 'source=google', 'NONSSL', false);

The 'source=google' is the optional tracking variable. I added it because this is an experimental program from Google and I want to keep tabs on it. You can change it to your liking or not. I hope this helps SEF users out there!

 

 

I am using SEF Link Transformer for osCommerce Version: Lite 0.8.0 Alpha and installed (with thanks) above update.

 

However, on checking the sitemapproducts.xml page I am just wondering if this is the way it should display? As it is still displaying the default osC names and not the SEF link (product) names.

 

Example:

 

<urlset>

-

<url>

-

<loc>

http://www.solera.nl/product_info.php?products_id=45

</loc>

<lastmod>2005-10-01</lastmod>

<changefreq>weekly</changefreq>

<priority>1.0</priority>

</url>

 

 

Please advise

 

Thanks in advance

Rene

Link to comment
Share on other sites

Hi all

 

This contribution was working fine and the xml files were/are generated and fed to Google OK.

Or so i thought. I have just set up a new site and thought i'd set up the sitemap for this, so i go to my google admin and see that the file for my older site is uploading with errors. On checking i get the same error when i call any of the xml files in my address bar. The files are actually generated (if you look in them (ftp)).; The error i get on all the files is:-

 

LIne 1 on all the files is <?xml version="1.0" encoding="UTF-8"?>

MY site is HERE

 

I have no idea how long it has been like this as i get the cron e:mail saying all files generated and uploaded OK.

Any help on this appreciated.

TIA

 

Julian

Anybody got any ideas why this is happening? The error is when i call the siemaps to my site.

I have reinstalled it on both sites, one works fine the other gives the above error.

Thanks

julian

A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Link to comment
Share on other sites

shopping

 

If you replaced the two sections, the URL should either be written correctly or be broken... Please review the installation and provide more info.

 

Hello Willross,

Thanks for your reaction.

I have reviewd the 2 sections of the update and it seems to be OK.

 

Line 400 - 410 looks like this:

\

 

while( $result = $this->DB->FetchArray($products_query) ){

$top = max($top, $result['products_ordered']);

$location = $this->hrefLink('product' . $result['pID'] . FILENAME_PRODUCT_INFO, 'source=google', 'NONSSL', false);

$lastmod = $this->NotNull($result['last_mod']) ? $result['last_mod'] : $result['date_added'];

$changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ;

$ratio = $top > 0 ? $result['products_ordered']/$top : 0;

$priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', '');

 

$container[] = array('loc' => htmlspecialchars(utf8_encode($location)),

'lastmod' => date ("Y-m-d", strtotime($lastmod)),

'changefreq' => $changefreq,

 

Line 440 - 450 lookes like this:

 

ORDER BY parent_id ASC, sort_order ASC, categories_id ASC";

if ( $categories_query = $this->DB->Query($sql) ){

$this->debug['QUERY']['CATEOGRY']['STATUS'] = 'success';

$this->debug['QUERY']['CATEOGRY']['NUM_ROWS'] = $this->DB->NumRows($categories_query);

$container = array();

$number = 0;

while( $result = $this->DB->FetchArray($categories_query) ){

$location = $this->hrefLink('category' . $this->GetFullcPath($result['cID']) . FILENAME_DEFAULT, 'source=google', 'NONSSL', false);

$lastmod = $this->NotNull($result['last_mod']) ? $result['last_mod'] : $result['date_added'];

$changefreq = GOOGLE_SITEMAP_CAT_CHANGE_FREQ;

$priority = .5;

 

 

The result in http://www.solera.nl/sitemapproducts.xml

 

<?xml version="1.0" encoding="UTF-8" ?>

- <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">

- <url>

<loc>http://www.solera.nl/product45product_info.php?source=google</loc>

<lastmod>2005-10-01</lastmod>

<changefreq>weekly</changefreq>

<priority>1.0</priority>

</url>

- <url>

<loc>http://www.solera.nl/product52product_info.php?source=google</loc>

<lastmod>2005-10-01</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

- <url>

<loc>http://www.solera.nl/product53product_info.php?source=google</loc>

<lastmod>2005-10-01</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

- <url>

<loc>http://www.solera.nl/product58product_info.php?source=google</loc>

<lastmod>2005-10-01</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

- <url>

<loc>http://www.solera.nl/product51product_info.php?source=google</loc>

<lastmod>2005-10-01</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

- <url>

<loc>http://www.solera.nl/product55product_info.php?source=google</loc>

<lastmod>2005-10-01</lastmod>

<changefreq>weekly</changefreq>

<priority>0.1</priority>

</url>

</urlset>

 

Please let me know if you need more info.

 

Thanks in advance

Rene

Link to comment
Share on other sites

Hi,

 

I have installed this contrib and if it does what I think it does then it will be great. The only thing is that after setting up the cron I keep getting emails which contain the following ...

 

PHP Notice: Constant FILENAME_FEATURED already defined in /home/httpd/vhosts/cablesandkits.com/httpdocs/includes/filenames.php on line 248

PHP Notice: Constant FILENAME_FEATURED_PRODUCTS already defined in /home/httpd/vhosts/cablesandkits.com/httpdocs/includes/filenames.php on line 249

PHP Notice: Constant FILENAME_PRODUCT_LISTING_COL already defined in /home/httpd/vhosts/cablesandkits.com/httpdocs/includes/filenames.php on line 301

PHP Notice: Constant MODULE_SHIPPING_FEDEX1_LIST_RATES already defined in /home/httpd/vhosts/cablesandkits.com/httpdocs/googlesitemap/index.php on line 60

Content-type: text/html

 

X-Powered-By: PHP/4.3.10

 

 

 

<pre>Generated Google Product Sitemap Successfully

 

Generated Google Category Sitemap Successfully

 

Generated Google Sitemap Index Successfully

 

CONGRATULATIONS! All files generated successfully.

 

.......

 

 

What does all that mean? I looked in the files and didnt really find anything that looked like it was trying to redefine those things. What could this be?

 

Any help is appreciated!

 

Craig

Link to comment
Share on other sites

Hi Will,

 

I have read this thread forward & backward...

 

I seen my error once on a post (page 4 I think?), but she seemed to fix it without telling how she did it...can you help me???

 

Here is my error...

 

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

 

 

--------------------------------------------------------------------------------

 

XML document must have a top level element. Error processing resource 'http://www.worldproductsonline.com/sitemapproducts.x...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...