JanL Posted December 4, 2016 Share Posted December 4, 2016 I updated all my sites and I noticed that when I checked my google sitemaps, its showing the following error for all my cubecart sites Errors Invalid date An invalid date was found. Please fix the date or formatting before resubmitting. 1,882 Parent tag: url Tag: lastmod Value: -0001-11-30T00:00:00+00:00 465 Dec 3, 2016 Parent tag: url Tag: lastmod Value: -0001-11-30T00:00:00+00:00 473 Dec 3, 2016 Parent tag: url Tag: lastmod Value: -0001-11-30T00:00:00+00:00 481 Dec 3, 2016 I cleared the cache in the admin and created a fresh sitemap and its still doing it. How can I fix this please? Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted December 4, 2016 Share Posted December 4, 2016 Welcome to the forums, @JanL. I've checked my sitemap, and 6.1.1 does create a good timestamp, so it's not a bug. I don't know how to help you, but while you're waiting for someone who can help to be on the forum there are a couple of things you can do. Is your sitemap providing actual correct url's? If so, you can use Find/Replace and temporarily change the timestamp in your sitemap to 2016-06-05T16:58:56-05:00 so you can at least get Google to crawl your sites. If you haven't already, please create the error log and report any messages created when you try to make a sitemap. Please be sure you X out your admin security naming before posting here. It might be helpful to know what you upgraded from and how you did the upgrade, eg. --- from within CC, via cPanel software, upload zipped file, extract, and run setup, OR extract and then upload files??? What is the url for your store? Do you have a complete backup of your store files and your databases? Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 4, 2016 Share Posted December 4, 2016 Please make this edit: In /classes/seo.class.php, near line 1017: Find: private function _sitemap_link($input, $updated = false, $type = false) { $updated = !$updated ? 'NOW' : $updated; Change to: private function _sitemap_link($input, $updated = false, $type = false) { $updated = (!$updated || "0000-00-00" == substr($updated,0,10)) ? 'NOW' : $updated; Perhaps you have inventory where these particular items have never been updated. That is, the database table CubeCart_inventory, 'updated' column has 0000-00-00 00:00:00 for a value. Quote Link to comment Share on other sites More sharing options...
JanL Posted December 4, 2016 Author Share Posted December 4, 2016 13 hours ago, bsmither said: Please make this edit: In /classes/seo.class.php, near line 1017: Find: private function _sitemap_link($input, $updated = false, $type = false) { $updated = !$updated ? 'NOW' : $updated; Change to: private function _sitemap_link($input, $updated = false, $type = false) { $updated = (!$updated || "0000-00-00" == substr($updated,0,10)) ? 'NOW' : $updated; Perhaps you have inventory where these particular items have never been updated. That is, the database table CubeCart_inventory, 'updated' column has 0000-00-00 00:00:00 for a value. That code change did the trick. Thanks again Brian Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.