Page 1 of 1
Google Sitemap Feed date error
Posted: Tue Aug 16, 2016 2:34 pm
by robbie269
Opencart ver 2.2. My Google Sitemap Feed is not woking properly. I am getting the following error in Webmaster Tools:
An invalid date was found. Please fix the date or formatting before resubmitting.
The example is:
Parent tag: url
Tag: lastmod
Value: -0001-11-30T00:00:00+10:00
And the date in the actual feed is: <lastmod>-0001-11-30T00:00:00+10:00</lastmod>
How can I fix this?
Re: Google Sitemap Feed date error
Posted: Wed Aug 17, 2016 7:27 am
by robbie269
Anyone?
Re: Google Sitemap Feed date error
Posted: Wed Aug 17, 2016 3:02 pm
by netbuster
I have the same problem. The workaround I used is to open the product and just save it. But this is very annoying problem.
Re: Google Sitemap Feed date error
Posted: Wed Aug 17, 2016 4:34 pm
by sculptex
How did you create your products? using an import tool?
Asuming the date is set correctly on your server then you could use phpmyadmin to correct last modified dates on your products to the current date using
Code: Select all
UPDATE `oc_product` SET date_modified = now()
Re: Google Sitemap Feed date error
Posted: Thu Aug 18, 2016 6:07 am
by robbie269
Thankyou sculptex! That's what the problem was. All fixed now.
Re: Google Sitemap Feed date error
Posted: Mon Aug 22, 2016 5:55 pm
by X-TLC
sculptex wrote:How did you create your products? using an import tool?
Asuming the date is set correctly on your server then you could use phpmyadmin to correct last modified dates on your products to the current date using
Code: Select all
UPDATE `oc_product` SET date_modified = now()
Hi sculptex. I have same issue and could you tell me how should I go for edit the above you mentioned? Thank you
Re: Google Sitemap Feed date error
Posted: Thu Sep 01, 2016 6:06 am
by sculptex
Hi, you need to execute that sql command in your database.
The easiest way to do this us using phpmyadmin or similar, usually accessed through cpanel or similar provided by your hosting company.
However, by the very nature of your asking, it might be better to seek someone out who can help you as you can do a lot of damage if you are not familiar with such things. Whichever way you go, make sure you backup your database first!!
Re: Google Sitemap Feed date error
Posted: Thu Sep 01, 2016 6:16 pm
by uksitebuilder
Or you could upload the attached to your store root folder and run it in a browser.
Alternatively, try our Sitemap Extension - (See link in my signature)
Re: Google Sitemap Feed date error
Posted: Sun Nov 13, 2016 12:00 am
by mRC
I also have the same issue, can someone explain how to fix this issue. The server time is correct.
many thanks
Re: Google Sitemap Feed date error
Posted: Sun Nov 13, 2016 7:06 pm
by thekrotek
mRC wrote:I also have the same issue, can someone explain how to fix this issue. The server time is correct.
It's not a server time, it's a wrong date_modified value for some products. There's a simple query given above - just run it and it should fix the issue.
I'd also suggest you to replace default sitemap extension with
Smart Sitemap. It will give you full control over your sitemap and XML is generated way much better.
Re: Google Sitemap Feed date error
Posted: Mon Dec 05, 2016 12:07 am
by phamxuanvinh2110
the same one. I did above support, but error no fix.

Re: Google Sitemap Feed date error
Posted: Thu Dec 15, 2016 1:11 pm
by Poplarman
Here's an extension which validates 100%
Click here
Re: Google Sitemap Feed date error
Posted: Sat Dec 17, 2016 12:34 pm
by phamxuanvinh2110
fix done. fix google sitemap.php, rewrite date.
Re: Google Sitemap Feed date error
Posted: Sun Jun 17, 2018 6:32 pm
by Jansuh
sculptex wrote: ↑Wed Aug 17, 2016 4:34 pm
How did you create your products? using an import tool?
Asuming the date is set correctly on your server then you could use phpmyadmin to correct last modified dates on your products to the current date using
Code: Select all
UPDATE `oc_product` SET date_modified = now()
Thanks that solved my problem!
Re: Google Sitemap Feed date error
Posted: Mon May 04, 2020 12:21 am
by sajuk
FIXED...
Code: Select all
UPDATE `oc_product` SET date_modified = now()
Ran the simple SQL query through phpMyAdmin Worked for me fixed.. OC 2.3.0.2
Thanks
Re: Google Sitemap Feed date error
Posted: Sat May 08, 2021 7:31 pm
by Tee.Mothiba
Hi
running oc 3.0.2.0 I have tried to follow the above steps however the issue still persists resubmitting my sitemaps. oc product updated Date added = Date modified has been updated accordingly (2021-05-08 13:05:47)
is there anything i can look at
errors as received
An invalid date was found. Please fix the date or formatting before resubmitting.
Examples
Line 1
Parent tag:
url
Tag:
lastmod
Line 1
Parent tag:
url
Tag:
lastmod
Line 1
Parent tag:
url
Tag:
lastmod
Re: Google Sitemap Feed date error
Posted: Sat May 08, 2021 7:37 pm
by thekrotek
Tee.Mothiba wrote: ↑Sat May 08, 2021 7:31 pm
is there anything i can look at
Check the dates in your DB for products and their images.
Re: Google Sitemap Feed date error
Posted: Sat May 08, 2021 7:46 pm
by JNeuhoff
running oc 3.0.2.0 I have tried to follow the above steps however the issue still persists resubmitting my sitemaps. oc product updated Date added = Date modified has been updated accordingly (2021-05-08 13:05:47)
Yours is a different issue. For a start, you are not using the standard OpenCart sitemap.xml:
https://www.soundlouder.co.za/sitemap.xml
And your
https://www.soundlouder.co.za/index.php ... le_sitemap which should be the same results in an empty output.
Hence, unless you are telling us the whole story, nobody will be able to help you here. It's certainly not an OpenCart bug.