• Home
  • Get help
  • Ask a question
Last post 1 hour 41 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67911
All time tickets 10496
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#8530 – Google invalid date on sitemap

Posted in ‘4SEO’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Friday, 18 February 2022 13:04 UTC
fgonzalez

Hi!

In Google Search Console, when I click on sitemaps and then clic again over /sitemap4seo.xml I see the sitemap divided in three parts, and each part have a high number of errors. If I click on it the error is "invalid date" for all the affected rows. I opened the file and see that many rows have no date, others have 0000-00-00 00:00 Z and the good ones have dates like this 2018-12-18 09:41 Z

So... the problem could be, the empty dates rows, the 0000-00-00 rows, or the "good rows" if the month is not in the right position.

What do you think and how we can solve this?

Friday, 18 February 2022 13:20 UTC
wb_weeblr

Hi

Without full and real links, there's not much that can be done.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Friday, 18 February 2022 13:34 UTC
fgonzalez

Mi sitemap is

http://www.xxxx.com/sitemap-4seo.xml

(I don't know why it doesnt works with secure connection https://www.xxxx.com/sitemap-4seo.xml)

Friday, 18 February 2022 13:44 UTC
wb_weeblr

Hi

(I don't know why it doesnt works with secure connection https://www.xxxx.com/sitemap-4seo.xml)

It works perfectly under https (just look up the page source code):

Simply text is "white on white" and you can't see it, and the reason is because the stylesheet is blocked.

And the reason it is blocked is because it's loaded from the http address:

it's not secure to load an http file from an https page, so your browser is blocking it.

And the reason 4SEO is using the HTTP address instead of the proper, https one, is because that's what you have selected as your website address in  4SEO settings (Pages | Settings | Website home address).

So the first thing to do is fix the website home address, then go to Sitemaps | Rebuild Now and reload the sitemap in your browser (you may have to wait a few minutes before it's actually rebuilt).

So... the problem could be, the empty dates rows, the 0000-00-00 rows, or the "good rows" if the month is not in the right position.

The only invalid dates are the 000... ones. The first URL I can see with this problem is:

http://www.xxxx.com/entrevistas/2107-lisa-lutoff-perlo-la-nueva-organizacion-en-europa-es-una-gran-oportunidad-para-celebrity-cruises

So I'd suggest you:

- go and check all the settings for this item, including whether it has valid creation/modification recorded

- tell me what kind of content that is? a regular Joomla article? something else? [EDIT]: this is a K2 article, right?

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 

 

 

 

 
Friday, 18 February 2022 14:31 UTC
fgonzalez

No... my setup in Pages | Settings | Website Home address is ok with https

I'll rebuild the sitemap and see what happens

The content you point is K2, most of my contents are K2 posts.

Friday, 18 February 2022 14:35 UTC
wb_weeblr

Hi

No... my setup in Pages | Settings | Website Home address is ok with https

Well it was not set up correctly when the sitemap was first generated, as it's working fine now on https.

I'll rebuild the sitemap and see what happensI'll rebuild the sitemap and see what happens

You need to do this first:

- go and check all the settings for this item, including whether it has valid creation/modification recorded

Most of your articles are fine, only some don't have a date, so this suggests some creation/modification dates stored in the database are not correct. Did you import/export content at some point? or upgrade the site from Joomla 2 to 3 or something like that?

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 

 

 
Friday, 18 February 2022 17:13 UTC
fgonzalez

Well, my website have a long history starting in Joomla 1.5.... and at some point I migrate joomla articles to K2, etc... but the article you point is new, year 2020... I checked it and all the dates looks good, even in mySQL, created and published_up date are ok, and modified is 0000-00-00 but that's ok for post that haven't been modified.

Friday, 18 February 2022 17:17 UTC
fgonzalez

Well! exactly, that's the problem, 4SEO takes the date from "modified" field, even if the articles never have been modified... you should implemet a check, and if the modified date is 0000-00-00 then, take the data from created field.

Friday, 18 February 2022 17:39 UTC
wb_weeblr

Hi

I already do that:

		$lastMod = $this->contentData['content']->modified;
		$lastMod = empty($lastMod)
			? $this->contentData['content']->created
			: $lastMod;

I think the problem is that K2 uses the outdated convention of '0000-00-00 00:00:00' when a datetime is empty instead using a NULL date. This will trigger an error with recent MYSQL versions.

I'll take it into account anyway. I'll have a dev version in a few minutes.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Friday, 18 February 2022 17:42 UTC
wb_weeblr

Hi

I have uploaded a dev version to the development versions download area. You can install over the current one and test the fix works. Make sure to clear any cache.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
Friday, 18 February 2022 17:59 UTC
fgonzalez

I downloaded it, intalled it, and rebuild the sitemap. Now the records with empty modified date have the Last Mod empty... I think they should have the creation date instead.

Friday, 18 February 2022 18:26 UTC
wb_weeblr

Hi

That's what it should have.  I am testing for the modified value to be '0000-00-00 00:00:00'.

This is what I have in my K2 installations:

Is this what you have also? or do you actually have:

and modified is 0000-00-00 

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 

 
Friday, 18 February 2022 18:36 UTC
fgonzalez

Yes, I have 0000-00-00 00:00:00 in the database, but I think that in the sitemap should the Last Mod field should be filled the created date then, but if you think leaving it empty it's ok, let's wait what search console says

Friday, 18 February 2022 18:41 UTC
wb_weeblr

Hi

 but I think that in the sitemap should the Last Mod field should be filled the created date then,  but I think that in the sitemap should the Last Mod field should be filled the created date then, 

==> 

That's what it should have.  I am testing for the modified value to be '0000-00-00 00:00:00'.

I think you need to redo the analysis. As the modification/creation date is stored during the analysis, not when the sitemap is created. We also use that date for other things, so we store it to avoid having to compute it again and again.

I have re-run a test locally and all K2 items get the creation date as expected, without any exception.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 

 
Friday, 18 February 2022 19:00 UTC
fgonzalez

Ok, I'm restarting the analysis

Monday, 21 February 2022 09:59 UTC
fgonzalez

It's working ok now, problem solved!

Monday, 21 February 2022 10:06 UTC
wb_weeblr

Hi

Glad to hear that! Closing this ticket now, feel free to open a new one as needed. If you do so, please mention this ticket number in the new one.

If you created any superadmin account for us, be sure to delete or block it now to avoid unnecessary risk in the future.

Best regards

Yannick Gaultier

weeblr.com / @weeblr

 

 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.