Video schema uploadDate problem

#238226
  • Resolved Mohammadreza Jafari
    Rank Math free

    Hello

    I can’t use video schema on my posts because something wrong with “uploadDate”

    Google Rich Results Test :

    google rich results

    As I know “uploadDate” format is wrong and problem is there is no “T” between Date and Time.
    I mean if I change “1400-05-0613:22:30” to “1400-05-06T13:22:30″ manually, problem will be fixed.

    P.S :
    I have latest version of Rank Math Free.
    I’m pretty sure schema was added to page by Rank Math because I checked source of page.
    In these issues some users have my problem and all of them using Jalali date not Gregorian. Maybe this will help solve the problem.
    #221135
    #146989
    #109451
    #104677

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

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress login in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    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/

    We really look forward to helping you.

    Hello,

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

    Thank you.

    This problem was fixed before 2-3 updates, but the problem is occurring again.
    I’m following here instead of opening a separate support request.

    Rich Snippet Problems ;
    Date/time value in field “uploadDate” is not in ISO 8601 format
    Invalid value type for field “uploadDate”

    Hello,

    I couldn’t reproduce this issue on my setup even after installing Jalali date & WP Parsi date plugins.

    Can you please add your site’s FTP access details in the Sensitive Data section so we can debug it by editing some plugin files?

    Looking forward to helping you.

    Hello,

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

    Thank you.

    I added Ftp access details.
    Maybe this is not related to Jalali or Wp Farsi, that was just a guess.
    As ‘Nuno Gonzales’ mentioned this issue had happened before and fixed.

    %date(Y-m-d\\TH:i:sP)%
    Double typing fixes the error. “\\”
    There is a problem in the code structure, but I found a solution in this way.
    I found this myself. Maybe it can help others. It definitely doesn’t work when I add a single “\”.

    and;

    I guess the VideoObject schema is not checked at all. isFamilyFriendly automatically returns true and you cannot set it to false. We need to be able to do this from the advanced editor as well.

    Please tell me if this problem is going to be solved soon or not ?
    Because I’m getting a lot of messages from Google ِ Search Console.
    I can use alternative plugins until this problem will be fixed.

    Thanks

    Hello,

    It looks like the uploadDate throws an error when the Site language is Persian. I was able to reproduce the issue and have logged it. Please allow us some time to test and release a fix.

    For now, to fix the issue on your site please add the following code in your theme’s functions.php file:

    
    add_filter( "rank_math/snippet/rich_snippet_videoobject_entity", function( $entity ) {
    	global $post;
    	$entity['uploadDate'] = mysql2date( 'Y-m-dTH:i:sP', $post->post_date, false );
    	return $entity;
    } );
    

    This should fix the issue.

    I hope that helps.

    Thank you for answering

    I can’t add this because my theme’s functions.php is coded by theme owner.
    Can you tell me how you solved problem of that specific post?
    This way I can apply to other posts as well manually until next release.

    Hello,

    You can install the code snippets plugin and add the code in that.
    https://wordpress.org/plugins/code-snippets/

    That way, you do not need to fiddle with the theme files.

    Hope that helps.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Video schema uploadDate problem’ is closed to new replies.