• Resolved xckdl

    (@xckdl)


    I am getting a validation error from Naver when I try to submit the sitemap file for indexing. When I pass the file through a xml validator, there were no issues. See screenshot below:
    https://drive.google.com/file/d/1LYQSvN7NbiqQhKdK07YKXKGxxgvAukQI/view?usp=sharing

    The error popup message translates to: “There is an error on your sitemap at 7th line”
    Line 7: <lastmod>2021-06-22T22:30+00:00</lastmod>

    I am suspecting that Naver only takes a timestamp format of: yyyy-mm-dd hh:mm:ss, but currently the plugin is generating yyyy-mm-dd hh:mm. I am unable to find a way to modify the timestamp in the plugin settings. Does anyone know how to resolve this issue with Naver or modify the timestamp (if that is what is causing the issue)?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    I believe this to be a bug with Naver. The timestamp is outputted using a W3C Datetime format, which are recognized by the official sitemaps.org protocol.

    Until they resolve that, you can simplify the timestamp at “SEO Settings > General Settings > Timestamps.”

    Thread Starter xckdl

    (@xckdl)

    Naver is still throwing a validation error with the simplified timestamp.
    Anyway I can change the timestamp to: yyyy-mm-dd hh:mm:ss to try?

    I am hoping to do some customization on my side for the fix since Naver doesn’t have a support team on this so I’m not sure when I will hear a response from them

    Plugin Author Sybre Waaijer

    (@cybr)

    I’m afraid the timestamp values are hard-coded into the plugin, so there’s no way to change them. A minor update is imminent, and I’ll provide a way to modify this.

    I noted the issue internally, and I’ll report back to you with integration details later.

    Plugin Author Sybre Waaijer

    (@cybr)

    Howdy!

    The following filter will add seconds to the timestamps:

    add_filter( 'the_seo_framework_timestamp_format', function( $timestamp, $get_time ) {
    	return $get_time ? 'Y-m-d\TH:i:sP' : 'Y-m-d';
    }, 10, 2 );

    This filter will be available from The SEO Framework v4.1.4 onward, ETA July 16th.

    What’s cool is that the filter value reflects in the SEO settings, too. That’s why the $get_time check needs to be performed.

    Please note that the timestamp change is not reflected in the sitemap’s stylesheet. The XML sitemap itself is affected, which is what search engines use.

    You may need to flush the sitemap’s cache after implementing the filter. You can do that by updating any post or resaving the SEO Settings. With some caching plugins, you may also need to flush those page/object caches.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘naver validation error: sitemap’ is closed to new replies.