• Resolved terremoto1996

    (@terremoto1996)


    Hi, when I updated Yoast seo to version 19.3 I start to get warnings

    ErrorException /wp-content/plugins/wordpress-seo/src/helpers/url-helper.php in Yoast\WP\SEO\Helpers\Url_Helper::recreate_current_url
    Warning: Undefined array key "SERVER_NAME"

    line 245

    from the stack trace I was able to understand that the problem is generated when wordpress launches cron.

    Before updating the yoast plugin this never happened to me.

    To avoid these warnings, I delayed doing so

    $current_url .= (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'www.forap.it') . $suffix;

    I would like to know why yoast has this error now and if it affects seo, and when this bug will be fixed

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • jeroenvip

    (@hieronymusdesign)

    What user is running the cronjob? We are also running some scripts inside wordpress not as www-data, which generates this error on the CLI.

    I’d like to add that I’m also seeing the warning in my logs and it occurs when I run my cron jobs through WP-CLI. I have disabled wp-cron from wp-config. Also I’m running them as the files owner account, not as www-data.

    Thread Starter terremoto1996

    (@terremoto1996)

    that’s right, the problem is when the cron is started, but I can’t turn them off I need it. Will this problem be solved with YOAST?

    It makes sense that it’ll throw a warning for cron jobs through CLI because there’s no SERVER_NAME index for php-cli.

    Thread Starter terremoto1996

    (@terremoto1996)

    Of course! but understand I hate these alerts, they clog up the Sentry Log platform. I reiterate that these warnings started coming when I updated Yoast to the latest version, it didn’t happen before

    jeroenvip

    (@hieronymusdesign)

    @sotiris_k You are correct. Wheb you run something inside the wordpress folder other then www-data SERVER_NAME is not set. Using nginx.

    Thread Starter terremoto1996

    (@terremoto1996)

    so what should I do?

    Plugin Support Maybellyne

    (@maybellyne)

    Hello Everyone,

    Thank you for bringing this issue to our attention. I’m sorry that our plugin caused a problem on your site. Our product team has created a bug report, and it is under review.

    Workaround
    At this time, there is no known workaround.

    What’s next?
    Our product team will assess the severity of the issue and assign a priority level to the report. Our developers work on the highest priority issues first. We cannot give you an estimate of when they’ll start working on the issue.

    If you have any further information that may affect the prioritization or help our development team solve this bug, please leave a comment or subscribe to the GitHub report to get updates on the issue.

    https://github.com/Yoast/wordpress-seo/issues/18688

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Warning: Undefined array key “SERVER_NAME”’ is closed to new replies.