Support » Plugin: XML News Sitemap » Fatal error with PHP 7.1 when editing meta description

  • Resolved w-sky


    Hi there,

    I have noticed a bug that is triggered with PHP 7.1 when using Yoast SEO and saving changes to the meta description of a WordPress post. Using PHP 7.1.10 – but now I had to revert to PHP 7.0.24

    With PHP 7.0 everything is fine. Also, when I deactivate XML News Sitemap and am running PHP 7.1, there are no problems.

    With PHP 7.1, Yoast and XML News Sitemap activated I am getting an empty page when trying to save changes to the meta description, and the following error in WordPress debug mode:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function sanitize_meta(), 1 passed in /usr/www/wp-content/plugins/xml-news-sitemap/gns_xml.php on line 312 and exactly 3 expected in /usr/www/wp-includes/meta.php:946
    Stack trace:
    #0 /usr/www/wp-content/plugins/xml-news-sitemap/gns_xml.php(312): sanitize_meta('de')
    #1 /usr/www/wp-includes/class-wp-hook.php(300): Gns_xml->dbdGsnSavePostData(18684)
    #2 /usr/www/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
    #3 /usr/www/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #4 /usr/www/wp-includes/post.php(3510): do_action('save_post', 18684, Object(WP_Post), true)
    #5 /usr/www/wp-includes/post.php(3583): wp_insert_post(Array, false)
    #6 /usr/www/wp-admin/includes/post.php(378): wp_update_post(Array)
    #7 /usr/www/wp-admin/post.php(193): edit_post()
    #8 {main} thrown in /usr/www/wp-includes/meta.php on line 946
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Justin Norton


    Hello @w-sky, this issue should be resolved now. I have changed the Genres select field to be a standard text field and made some code updates to reflect this change. I think this is the best way forward as Google will most likely introduce new Genres all the time so having a free-form text field will allow publishers to adapt to these changes.

    Thread Starter w-sky


    Thanks, I confirm. This error is gone.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error with PHP 7.1 when editing meta description’ is closed to new replies.