Thread: Sitemap
View Single Post
  #3  
Old 03-23-2015, 11:50 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Sitemap

Quote:
Originally Posted by cflsystems
So then it doesn't work
You are correct sir!

Digging into this issue, (And I have discovered that it goes back at least to XC 5.1., I find that the root cause is this method:

XLite/Module/CDev/XMLSitemap/Controller/Customer/Sitemap.php
Code:
public function processRequest() { $generator = \XLite\Module\CDev\XMLSitemap\Logic\SitemapGenerator::getInstance(); if (!$generator->isGenerated() || $generator->isObsolete()) { $generator->generate(); } $index = intval(\XLite\Core\Request::getInstance()->index); $content = $index ? $generator->getSitemap($index) : $generator->getIndex(); $this->displayContent($content); }

Line 50: $index = intval(\XLite\Core\Request::getInstance()->index);

This^ always returns a 0 in my tests, and it needs to be a 1. The xml files are saved in the var/data directory and in every case I have examined (about a dozen) the file is invariably xmlsitemap.1.xml. Never 0.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote