Jump to content

Any changes that effect Sitemap since CC 6.2.2???


Recommended Posts

I have been faithfully upgrading each time a new CC version came out. I test before going live, but I really goofed this last year. I've had no problems with any part, until I caught an issue last night.

I have not listed any new products in about a year. Recently I started back, so I went to update the Sitemap last night, only to discover that it is creating a blank map. My code is FAR from stock, so it's going to be hard to find what changed in CC that I need to fix. I started reverting to older versions last night and had to go all the way back to 6.2.2 to get a shop that the sitemap worked on.

Can anyone tell me what might have been changed in stock that would have affected the sitemap creation?

Also, can you tell me any and all files that I need to double check that have anything to do with sitemap creation?

AND I don't have a clue how to revert the database changes that have been made since 6.2.2. So right now I have files at 6.2.2, but a database that is at 6.2.5+ the current commit.

In the meantime, I'll be doing a lot of code comparing, trying to spot the offending code for myself :(

 

Link to comment
Share on other sites

Please elaborate on the meaning of a "blank sitemap". So, the file is created? Is it zipped or plain text? Is there anything in the file (blank lines but still end-of-line, or absolutely zero bytes in the file)?

The only relevant things I have found since CC622 is that creating the URL for the objects will use 'strtolower()' if 'mb_strtolower()' is not available. (Issue #2087 is in CC622.)

Do you have any code snippets or plugin hooks that affect the sitemap?

Link to comment
Share on other sites

Thanks for the reply. I get no 404 - just a blank webpage. But I think I found it. You had helped me a long time ago get rid of the gzip stock version of the sitemap - because I have a dirtybutter.com Wordpress sitemap plugin that needed to use a link to an actual dirtybutter.com/plushcatalog/sitemap.xml. When I leave out your special code in seo.class, 6.2.5 creates a correct sitemap.gz file. I will have to see if Google will accept the virtual WP sitemap using the sitemap.gz as one of its links. I suspect Google will complain, but no need to worry until it's had time to be accepted or rejected.

I've compared files all the way from 6.2.2 up to 6.2.5 - I did find some errors on my part, and the sitemap.xml now works with all my non-stock code until 6.2.5.

Would there be a way to make a snippet to take the sitemap.gz result and decompress it automatically to the sitemap.xml file in dirtybutter.com/plushcatalog?

 

Link to comment
Share on other sites

In /classes/seo.class.php, the public function sitemap(), a test is made to determine if PHP has the Zlib extension installed (testing for the availability of the function gzencode). Zlib is typically installed.

There is no admin setting to override this -- but one can be easily added.

The sitemap() function would still need to be edited. Line 816:

From:
if (function_exists('gzencode')) {

To:
if (false && function_exists('gzencode')) {

There is no solution to using a snippet to decompress the GZ file back to an XML file because the sitemap() function immediately contacts Google to let it know that the file just created is available.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...