• Resolved Torsten Landsiedel

    (@zodiac1978)


    Hi @kybernetikservices !

    In this thread the user @eikomadori is reporting, that Google is still complaining about the date/time format.

    I get the same error in the search console and I think there is a mistake in the TZD = time zone designator (Z or +hh:mm or -hh:mm) mentioned in the other thread.

    The date is showing like this:
    2023-02-10T10:46:33+0000

    But I think it should be:
    2023-02-10T10:46:33+00:00

    (Please note the missing “:” in the time zone offset.)

    Additionally, I think it makes no sense to add a priority to the same static value of 0.5 or a change frequency to “never”.

    Looking at the spec the change frequency should only be set to “never” for archived URLs. This could also a SEO problem, because “never” means that the URL will be crawled much less.

    Setting the priority to 0.5 for everything is not necessary, because 0.5 is the default value anyway.

    According to the spec:

    The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites—it only lets the search engines know which pages you deem most important for the crawlers.

    This means setting everything to any static value makes no sense, too. It should be used to prioritize the content on your site.

    Is there a public Github repo available to suggest any PRs?

    Thanks in advance!
    All the best
    Torsten

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Torsten Landsiedel

    (@zodiac1978)

    For the date format, I think I have found the problem:

    The constant DATE_ISO8601 is not really ISO-8601:

    Note: This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons. Use DateTimeInterface::ISO8601_EXPANDED, DateTimeInterface::ATOM for compatibility with ISO-8601 instead. (ref ISO8601:2004 section 4.3.3 clause d)

    https://www.php.net/manual/de/class.datetimeinterface.php#datetimeinterface.constants.types

    This change would be in class-wp-sitemaps-config-public.php in line 226:

    $entry['lastmod'] = date( DATE_ISO8601, strtotime( $post->post_modified_gmt ) );

    Needs to be changed to:

    $entry['lastmod'] = date( DATE_ATOM, strtotime( $post->post_modified_gmt ) );

    • This reply was modified 1 year, 9 months ago by Torsten Landsiedel. Reason: Removed alternative after some testing
    Plugin Author Kybernetik Services

    (@kybernetikservices)

    Dear @zodiac1978. Thank you for your time and effort to improve WP Sitemap Config.

    I took a look at the problem and was able to fix it with your suggested solution. The current version 2.1.1 has just been uploaded.
    Please let me know if it works for you, now.

    I will add dedicated priority settings in the next minor release, which will take a little more time.

    A github repo isn’t currently available, but I think I’ll create one in the future.

    Thread Starter Torsten Landsiedel

    (@zodiac1978)

    Hi @kybernetikservices,

    The current version 2.1.1 has just been uploaded.

    thank you very much!

    I will add dedicated priority settings in the next minor release, which will take a little more time.

    This is great news! Maybe have a look at XML Sitemaps or All-in-One SEO if you are looking for UI ideas to implement this.

    A github repo isn’t currently available, but I think I’ll create one in the future.

    This would be really nice, because it is much easier to collaborate on GitHub. Thanks for considering my ideas!

    All the best
    Torsten

    Plugin Author Martin Stehle

    (@hinjiriyo)

    Thank you, Torsten, for your suggestions and your review. When I wrote this plugin, I had to consider which of the values allowed for the changefreq tag could be set as default. The specs didn’t specify one. “Always” didn’t make sense to me. And the values for in between, e.g. “monthly”, didn’t fit for a few reasons. I decided on “never”, since blog posts and especially pages are unlikely to change for a long time.
    But there is room for suggestions on a new default value. Which of the given ones would make the most sense to you?

    Thread Starter Torsten Landsiedel

    (@zodiac1978)

    Hi @hinjiriyo

    like I already wrote, I would look at the long time existing plugins “XML Sitemaps” and AIOSEO (the only ones I found which offer this addition)

    XML Sitemaps has the following defaults:
    Home -> Daily
    Posts -> Monthly
    Static Pages -> Weekly
    (Product) Categories -> Weekly
    Current month ((Should be the same like your homepage)) -> Daily
    Older archives -> Yearly
    Tag pages -> Weekly
    Author pages -> Weekly

    All-in-one SEO has the following defaults:
    Home -> Always
    Posts -> Weekly
    Pages -> Weekly
    Media -> Weekly
    CPTs -> Weekly
    CPT Archive -> Monthly
    Tag Archive page -> Monthly

    I don’t think a one-size-fits-all solution exists here. It depends on the specific sitemap.

    Does this help you a bit?

    Plugin Author Martin Stehle

    (@hinjiriyo)

    This helps. I’d shorten it to

    home, front page or archive => daily
    singular page => weekly
    all other pages (search, 404, etc.) => monthly

    I’d think these are acceptable values.

    Thread Starter Torsten Landsiedel

    (@zodiac1978)

    Looks like a great plan! Thanks for optimizing this great little helper plugin ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Invalid Date format and other problems’ is closed to new replies.