Publishing post also triggers “Post Update” in Gutenberg Caused by RM

#167349
  • Resolved sarang
    Rank Math free

    Description
    So I am seeing a weird issue while publishing a new post. Publishing post using Gutenberg Editor also triggers Post Update function causing (post) published and (post) updated date duplicates.
    This does not happen with Classic Editor.
    I have tested the issue extensively and shortlisted a few troubling plugins that cause this:
    Add to any Buttons Plugin (outdated and removed)
    Lucky Table of Contents (outdated and removed)
    RankMath (which is the problem) (cannot remove)

    This may also be affecting my site’s SEO as it is adding duplicate “published” and “last modified” dates. I think this may also be a reason why my posts don’t feature in Google Discover anymore, like they used to.
    So instead of improving SEO, my site may potentially be negatively affected due to this silly date issue.

    Also, is it necessary to display the last updated date on posts? Or can I remove it? I can stop displaying it by just removing a piece of CSS code.

    Expected behavior
    Should only publish and not trigger post update.

    Actual behavior
    Publishes the post and starts updating it.

    Screenshots or screen recording
    Screenshot: (from production site)
    http://prnt.sc/10kh53j

    Video: (from staging site)
    https://d.pr/free/v/QwAHBv

    Using Classic Editor
    http://prnt.sc/10kl2zm

    WordPress information
    WordPress version: “5.6.2” & “5.7”
    All plugins except RankMath deactivated.
    Are you using a default theme “No” Using “Aquene” theme

    Device information
    Device: “Desktop”
    Operating system: “Windows 10”
    Browser: “Chrome 89”

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for the delay and for any inconvenience this issue may have caused you.

    Could you please confirm if you have also tested this using a default theme and Rank Math only activated in your staging site if the issue still persists?

    If so, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress Staging & FTP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Thank you, and we really look forward to helping you.

    sarang
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Prabhat
    Rank Math agency

    Hello,

    Thanks for the details.

    I was able to login into your website’s backend. I ran a plugin-theme conflict test and I noticed that the issue is still there when Rank Math and all the other plugins are deactivated.

    The issue seems to be from your theme’s end. Please see the screencast available in the sensitive data section of this ticket and confirm it on your end.

    Please let us know how that goes.

    Thanks.

    sarang
    Rank Math free

    Hi Prabhat,
    You clearly missed the point. The theme I use simply displays the updated date if the post has been updated. The problem is when RankMath is active, the post is published and immediately updated. This triggers the last updated date in the theme using Gutenberg editor.
    It also happens with the default theme. The default theme does not show the last updated date is because it does not have the code to show the last update date.
    Check out the video:
    https://www.loom.com/share/94c41c24b0774cc29089464f2e7d3d3f

    Prabhat
    Rank Math agency

    Hello,

    Thanks for your reply and I apologize for the confusion.

    I was able to replicate the issue and I have forwarded it to our dev. team for further investigation.

    In the meantime, if you have any further questions, please feel free to reach out and it will be our pleasure to assist you.

    Thanks.

    sarang
    Rank Math free

    Hi Prabhat,
    Thanks for checking it out. Hope to see a resolution real quick and get the plugin updated with priority. This will help my site and several others.

    Hello,

    Thank you for the update.

    I’ve already noted this issue and our dev team will get back to you shortly. We really appreciate your kind patience regarding this matter.

    Meanwhile, please don’t hesitate to contact us anytime to assist you further with anything else.

    Thank you.

    Hello,

    I am not sure what function your theme is using to check the post update date, but by default, WordPress updates both published_date and update_date when a post is published. If your theme is altering this default functionality of WordPress then that’s not a good thing. They should instead compare the post published & update date frontend and show the Update date only when it is different from the Published time.

    Also, this issue is not specific to the Rank Math plugin. I checked it with another SEO plugin and the same thing happens. You might want to get in touch with your Theme developer to ask them to change how they are handling the Post update date.

    I hope that helps. Please let us know if you need any further assistance.

    Thank you.

    sarang
    Rank Math free

    Hi,
    Apologies for the late reply.

    I am not sure what function your theme is using to check the post update date, but by default, WordPress updates both published_date and update_date when a post is published. If your theme is altering this default functionality of WordPress then that’s not a good thing. They should instead compare the post published & update date frontend and show the Update date only when it is different from the Published time.

    According to the Theme Author,
    The same approach uses a default (official) WordPress theme: https://github.com/WordPress/twentynineteen/blob/master/inc/template-tags.php#L14-L34

    I would like to share with you a function that is responsible for showing up the date:

    `function aquene_get_posted_on() {
    $time_string = ‘<time class=”entry-date published updated” datetime=”%1$s”>%2$s</time>’;
    if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) {
    $time_string = ‘<time class=”entry-date published” datetime=”%1$s”>%2$s</time><time class=”updated” datetime=”%3$s”>%4$s</time>’;
    }

    $time_string = sprintf( $time_string,
    esc_attr( get_the_date( DATE_W3C ) ),
    esc_html( get_the_date() ),
    esc_attr( get_the_modified_date( DATE_W3C ) ),
    esc_html( get_the_modified_date() )
    );

    return ‘<span class=”posted-on th-block”>’ . $time_string . ‘</span>’;

    }`

    As you can see from the code above, the theme does check/compare if the date is not the same ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) using native WordPress functionality.

    But there is a slight difference between the published time and update time as you can see here which is caused by Rank Math because it updates the post after publishing. (See the complete thread.) Your support also acknowledged it.

    Also, this issue is not specific to the Rank Math plugin. I checked it with another SEO plugin and the same thing happens. You might want to get in touch with your Theme developer to ask them to change how they are handling the Post update date.

    This doesn’t help. Just because some other SEO does it, does not mean Rank Math should either.

    Hello,

    We understand and we have forwarded your request to the dev. team.

    If we change the method in the future, we will let you know.

    In the meantime, please do not hesitate to let us know if you need our help with anything else.

Viewing 10 replies - 1 through 10 (of 10 total)

The ticket ‘Publishing post also triggers “Post Update” in Gutenberg Caused by RM’ is closed to new replies.