• Resolved Anthony Butler

    (@abutlwer)


    I am experiencing an unusual problem with the SEO title displayed in the browser tab – in both Chrome and Firefox. We are running a child theme of Twenty Twenty Sixteen 2.4 (WordPress 5.7.1, Yoast 16.2 with date archives enabled and a title of Date/Separator/Site title specified), but the error still occurs when we switch off our child theme and run vanilla Twenty Sixteen.

    If a full date (?/m=201901) is specified in the browser address bar, all is well and the month and year appear in the SEO Title in the browser tab. If just a year (/?m=2019) is specified, WordPress throws a PHP warning – Undefined index: 00 in /public/societies/cucrc/public_html/test/wp-includes/class-wp-locale.php on line 287 – and inserts a zero in the SEO Title rather than the year.

    This is not a big deal, but it would be nice to get rid of those pesky PHP warnings!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Thanks for reaching out here. We’re sorry to hear that you’re having trouble with Yoast SEO.

    We looked at the relevant page and were unable to reproduce the issue. Can you please confirm where exactly do you see the relevant PHP warning? Is it appear on the front end part or on the dashboard of the relevant page?

    We look forward to hearing from you.

    Thread Starter Anthony Butler

    (@abutlwer)

    Thank you for your very prompt response.  The PHP warning appears in the WordPress debug.log file.  We run our test system with debugging set:

    define(‘WP_DEBUG’, true); 
    if (WP_DEBUG) {
        define(‘WP_DEBUG_LOG’, true);   
        define(‘WP_DEBUG_DISPLAY’, false);     
    }

    Hope this helps.  The error seems to be something to do with Yoast SEO internationalisation – requesting translation of a zero month number when no translation is required because the ‘2019’ in the URI cucrc.org/test/?m=2019 is already ‘translated’ and there is no month number present to be translated.

    For some reason, three PHP warning messages appear for each load of the page. When I do a trace – using get_queried_object_id() – the current object is returned as 0.

    Plugin Support Maybellyne

    (@maybellyne)

    Hello,

    Thanks for making it clearer; we were able to replicate what you described. It seems we can surely improve this. So, please do feel free to submit a bug report directly to our GitHub development repository so our development team can look into the issue further.

    In addition, you would be able to see the progress of the relevant issue directly on GitHub as well.

    Thread Starter Anthony Butler

    (@abutlwer)

    That’s great – I have submitted a bug report. In the meantime I have eliminated the PHP warning by deleting the items Title and Page from the SEO title in the Yoast Date archives setting – and substituting the plain text ‘Date Archive’.

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Thanks for the bug report submission @abutlwer. Have a fantastic rest of your weekend!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Zero Year in SEO Title of Archive List’ is closed to new replies.