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!