• Resolved monitor

    (@oomskaap)


    I get this error in my Google Webmaster Tools:

    An invalid date was found. Please fix the date or formatting before resubmitting.

    Sitemap: https://www.xxxxxxxxxxx.com/sitemaps/product.xml
    Parent tag: url
    Tag: lastmod
    LIne: 5

    So when I look at line 5 source of the Sitemaps.xml file, i see this:

    <lastmod></lastmod>

    I assume there should be a date there, but because it is empty google shows an error?
    This is a Woocommerce product sitemap.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter monitor

    (@oomskaap)

    I think I know why. It is quite common for Woocommerce to remove or hide the /shop/ path, same as /category/

    The empty <lastmod></lastmod> at the beginning of the sitemap is because of that

    <loc>https://www.xxxxxx.com/shop/</loc&gt;
    <lastmod></lastmod>

    We hide/remove this /shop/ path via a function in our theme.

    Luckily you have an excluding option “Exclude some Posts, Pages or Custom Post Types”
    I enter the Page’s post ID 790104 in there, and then Flush permalinks, but the /shop/ page is still in the sitemaps file.

    It is odd because the only tickbox I have is for:
    Check to INCLUDE Post Types:

    Products
    Include

    So theoretically domain.com/shop/ should not be in the sitemaps.xml file
    To test I also ticked “Disable date after each post, page, post type?” and cache refresh the /sitemaps/product.xml file but nothing has changed. /shop/ is still at top, without a date, and everything else has a date.

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    Hi,
    Thank you for your feedback.
    I’m looking into it.

    I have the same error in WMT for posts /sitemaps/post.xml/ too.
    “An invalid date was found. Please fix the date or formatting before resubmitting.”
    Parent tag: url
    Tag: lastmod
    – there is url what is already in page.xml and it’s page with blog element (visual builder blog element used in page) – there is no date

    Pages are correct because there is no category.

    The same with product.xml as above.
    Page shop create by woocomerce is already in page.xml. It shoudln’t be here because is not custom post product.

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    Please update to SEOPress 2.6.2.

    I updated before posting my post. Just flushed permanent links. Nothing changed.

    Oh, and I have set remove category from url and it works on frontend, but there is empty category.xml.
    Confirmed. As soon as I put it off, category.xml is correct.

    • This reply was modified 6 years, 9 months ago by Jimako. Reason: added category info
    • This reply was modified 6 years, 9 months ago by Jimako.
    Plugin Author Benjamin Denis

    (@rainbowgeek)

    Please provide a link to your website.
    Thank you

    great, it was put on hold with link

    • This reply was modified 6 years, 9 months ago by Jimako.

    I tried, but it was held for moderation because that link. How should I do it? Or you can see it?

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    Send it to support[@]seopress.org

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Sitemap: An invalid date was found. Please fix the date or formatting before re’ is closed to new replies.