New Zenner
- Join Date:
- May 2009
- Posts:
- 67
- Plugin Contributions:
- 0
SitemapXML v.2
Thanks so much... Went into the debug files and found the missing file. All working now!
Views: 613,137
New Zenner
Thanks so much... Went into the debug files and found the missing file. All working now!
Deceased
christinefred:
Thanks so much... Went into the debug files and found the missing file. All working now!
What file was missing?
Zen Follower
Greetings All,
Just install latest ver (v 3.2.13 20.08.2015 11:14:48) on ZC 154. All seems to be working, xml files created, except when I enter the index.php?main_page=sitemapxml&inline=yes&token=xxxx parameter in Google Webmaster Sitemap Tester.
BTW, I've substituted the actual domain with your_domain since I am also using a security token.
Example: http://your_domain/index.php?main_page=sitemapxml&inline=yes&token=xxxx
Google Sitemap Tester returns:
Parsing error
We were unable to read your Sitemap. It may contain an entry we are unable to recognize. Please validate your Sitemap before resubmitting.
When I enter manually in Firefox, I receive the following error:
XML Parsing Error: XML or text declaration not at start of entity
Location: http://www.your_domain/index.php?main_page=sitemapxml&inline=yes&token=xxxx
Line Number 1, Column 2: <?xml version="1.0" encoding="UTF-8"?>
-^
When looking at the page source in Firefox, I notice that the xml file is correct except for the closing tag is incomplete. Not sure if this is the only issue.
</sitemapindex
If I submit and test the sitemap.xmp from the root directly, all is correct with NO errors.
Has anyone else experienced this? Any suggestion?
Thanks :D
Totally Zenned
I just tried it on mine. The only difference is I am running version:
3.2.12 19.09.2013 8:06:18
Zen Follower
lruskauff:
I just tried it on mine. The only difference is I am running version:
3.2.12 19.09.2013 8:06:18
So, I looked more closely at the error from FF. It seems that there is a white space before the opening declaration.
<?xml version="1.0" encoding="UTF-8"?>^
If I save the page source and remove the space, then reopen it in FF, no error! The problem is I can't seem to find were in the sitemap code this space is being introduced? The root sitemap.xml doesn't have this issue...
I looked at the function _SitemapXMLHeader() in the sitemapxml.php class where the first lines are:
function _SitemapXMLHeader() {
$header = '';
$header .= '<?xml version="1.0" encoding="UTF-8"?'.'>' . "\n";
No white space here, but some how when the $header is returned and sent back to the browser, there is a space???:shocking:
What do you think?:blink:
Totally Zenned
I would download the previous version and do a quick file compare using win merge or beyond compare. Hopefully it will pop right out.
Totally Zenned
lruskauff:
I would download the previous version and do a quick file compare using win merge or beyond compare. Hopefully it will pop right out.
The latest update is only updated for the author's own commercial product. There is no reason to use this version unless you are using this commercial product. IMHO ist should not even have been added to the code. He did not document it in the readme, and never ever made a comment in this thread.
Deceased
kwright:
So, I looked more closely at the error from FF. It seems that there is a white space before the opening declaration.
<?xml version="1.0" encoding="UTF-8"?>^
If I save the page source and remove the space, then reopen it in FF, no error! The problem is I can't seem to find were in the sitemap code this space is being introduced? The root sitemap.xml doesn't have this issue...
I looked at the function _SitemapXMLHeader() in the sitemapxml.php class where the first lines are:
function _SitemapXMLHeader() {
$header = '';
$header .= '<?xml version="1.0" encoding="UTF-8"?'.'>' . "\n";
>
> No white space here, but some how when the $header is returned and sent back to the browser, there is a space???:shocking:
>
> What do you think?:blink:
This is not a SitemapXML problem. Check language and all extra files. I wrote a script that is looking for extra spaces in PHP files. It helps to detect bad files. You can download it <https://goo.gl/88MtW2>/ Unzip, upload to cart root directory and start it - http://your_domain/found_extra_space.php
Zen Follower
a_berezin:
This is not a SitemapXML problem. Check language and all extra files. I wrote a script that is looking for extra spaces in PHP files. It helps to detect bad files. You can download it https://goo.gl/88MtW2/ Unzip, upload to cart root directory and start it - http://your_domain/found_extra_space.php
Thanks a_berezin,
Ran your script and found the following files had space at the end:
template_default/sitemapxml/html_header.php
template_default/common/html_header.php
However, both files have this comment at the bottom, followed by 2 new lines:
<?php // NOTE: Blank line following is intended: ?>Just for a test, I removed the extra line form both files. Made no difference.
Again, here is the output from the inline=yes parameter: Notice the space before the opening tag.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/includes/templates/template_default/css/gss.xsl"?>
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- generator="Zen-Cart SitemapXML" 3.2.13 20.08.2015 11:14:48 -->
<!-- sitemap.xml created at 2015-09-18 08:12:38 -->
<sitemap>
.
.
.
</sitemapindex>
Here's the content of the root sitemap.xml for comparison:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/includes/templates/template_default/css/gss.xsl"?>
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- generator="Zen-Cart SitemapXML" 3.2.13 20.08.2015 11:14:48 -->
<!-- sitemap.xml created at 2015-09-18 08:12:38 -->
<sitemap>
.
.
.
</sitemapindex>
What file(s) has the fix for the inline=yes that was mentioned in the plugin history?
Thank you!
Deceased
Hi,
kwright:
Ran your script and found the following files had space at the end:
template_default/sitemapxml/html_header.php
template_default/common/html_header.php
So the problem is more complicated than I had hoped. :(
kwright:What file(s) has the fix for the inline=yes that was mentioned in the plugin history?
This is a joke? Of course I do not remember that corrected a few years ago.
Have you checked the error logs? There is nothing?
Zen Follower
a_berezin:
Hi,
So the problem is more complicated than I had hoped. :(
This is a joke? Of course I do not remember that corrected a few years ago.
Have you checked the error logs? There is nothing?
There are no errors. My guess this is because the file is created successfully, it just fails in the browser & Google sitemap test because it is malformed due to the xml file starting off with a space...
Deceased
kwright:
There are no errors. My guess this is because the file is created successfully, it just fails in the browser & Google sitemap test because it is malformed due to the xml file starting off with a space...
You do not hear me. It is not sitemapxml problem, the problem somewhere else. It is necessary to search.
You can check a clean install 1.5.4 with sitemapxml - http://test15.zen-cart.zz/index.php?main_page=sitemapxml&inline=yes&token=xxxx
Check the source code of your default page http://your_domain/ - have any white space at the beginning?
Try to disable gzip compression.
Zen Follower
a_berezin:
You do not hear me. It is not sitemapxml problem, the problem somewhere else. It is necessary to search.
You can check a clean install 1.5.4 with sitemapxml - http://test15.zen-cart.zz/index.php?main_page=sitemapxml&inline=yes&token=xxxxCheck the source code of your default page http://your_domain/ - have any white space at the beginning?
Try to disable gzip compression.
Finally got around to troubleshooting this. Turns out, when I added an extra ob_end_clean() to this statement within the sitemapxml.php class, it fixed my issue.
if ($this->inline) {
if ($this->submitFlag) {
ob_end_clean();
ob_end_clean();
$this->_outputSitemapIndex();
} else {
ob_end_flush();
}
}
Seems as if there was an extra white space getting into the buffer. Maybe on_start() was getting call twice before hitting the first ob_end_clean()?
Anyhow, inline is now working for me! :D
New Zenner
Thank you very much for making this plugin.
I am running ZC v1.5.4 and I just installed this plugin for the first time. I think I did everything correctly, however, the site map on the root is completely blank. There are site maps found for Categories, EZ pages, Products, Manufactures, and the main page. All of these are full of URLs. But the one found at example.com/sitemap.xml is completely blank. Can you please point me in the right direction?
Deceased
Hi,
JoeToys:
Thank you very much for making this plugin.
I am running ZC v1.5.4 and I just installed this plugin for the first time. I think I did everything correctly, however, the site map on the root is completely blank. There are site maps found for Categories, EZ pages, Products, Manufactures, and the main page. All of these are full of URLs. But the one found at example.com/sitemap.xml is completely blank. Can you please point me in the right direction?
Zen Follower
Hello everyone,
Just did a clean install of Zen-Cart 1.5.4 and installed Sitemap XML (version 21 and Module version 3.2.13). However, no matter how I set up the includes/classes/sitemapxml.php file..., I can only create a maximum of about 12,500 products in my sitemapproducts.xml file. (I actually have around 30,000 products)
define('TABLE_SITEMAPXML_TEMP', DB_PREFIX . 'sitemapxml_temp');
define('SITEMAPXML_MAX_ENTRYS', 5000);
define('SITEMAPXML_MAX_SIZE', 10000000); // 10485760define('SITEMAPXML_CHECK_URL', 'false');
Also my php.ini file seems to have enough memory and execution time..., and also does change anything.
max_execution_time = 300
max_input_time = 180
memory_limit = 512M
Here is the result I get in my Sitemap File List:
Here is the result after forcing a rebuild:
(however I have over 800 categories, not 640, unless not all of the categories are showing up because not all of the products are being listed)
Here is the result of my log file:
[11-Dec-2015 08:52:43 America/Chicago] PHP Fatal error: 2008:MySQL client ran out of memory :: select products_type from products where products_id = '12441' ==> (as called by) /home4/oskopool/public_html/includes/functions/functions_lookups.php on line 522 <== in /home4/oskopool/public_html/includes/classes/db/mysql/query_factory.php on line 155
[11-Dec-2015 08:52:43 America/Chicago] PHP Fatal error: 2013:Lost connection to MySQL server during query :: select count(*) as total
from sessions
where sesskey = '147d0a2b7e06aa68ea26b7ce12d9f9fd' ==> (as called by) /home4/oskopool/public_html/includes/functions/sessions.php on line 66 <== in /home4/oskopool/public_html/includes/classes/db/mysql/query_factory.php on line 155
Any ideas? Anyone?
Thanks all,
Danny
Deceased
Hi,
danielosko:
Here is the result of my log file:
[11-Dec-2015 08:52:43 America/Chicago] PHP Fatal error: 2008:MySQL client ran out of memory :: select products_type from products where products_id = '12441' ==> (as called by) /home4/oskopool/public_html/includes/functions/functions_lookups.php on line 522 <== in /home4/oskopool/public_html/includes/classes/db/mysql/query_factory.php on line 155
[11-Dec-2015 08:52:43 America/Chicago] PHP Fatal error: 2013:Lost connection to MySQL server during query :: select count(*) as total
from sessions
where sesskey = '147d0a2b7e06aa68ea26b7ce12d9f9fd' ==> (as called by) /home4/oskopool/public_html/includes/functions/sessions.php on line 66 <== in /home4/oskopool/public_html/includes/classes/db/mysql/query_factory.php on line 155
I recently ran into this situation on site with 30,000 products. The reason - the query caching. Write to me in private, I'll send you the latest version.
Zen Follower
Thanks Andrew!!!
I appreciate it very much. I PM'd you
Danny
New Zenner
I just want to say thank you for this awesome plugin and all your work here in the forum. I got SitemapXML installed and functioning with all the help here. My biggest problems were an error in my config file and expecting the updates to Cpanel to be immediate - sometimes it takes a few seconds. In the meantime it was throwing errors at me. :smile:
Thank you so much!
Deceased
a_berezin:
Hi,
I recently ran into this situation on site with 30,000 products. The reason - the query caching. Write to me in private, I'll send you the latest version.
Andrew, could you please pm me a copy of the latest version or upload it to the Plugins?
Thanks / Frank
Fields marked required must be completed.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.