• Resolved ullasaugustine

    (@ullasaugustine)


    Hey There,
    I am getting this Fatal Error while I trying to create or edit post/page after Yoast installation.

    While further check I fount that its due to a conflict with CPT UI. If we de activate CPT UI, then we can edit posts.

    My WP version: 5.4.2

    Yoast Version: 14.6.1

    Please help me with this.

    PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /var/www/html/wp-content/plugins/wordpress-seo/src/routes/yoast-head-rest-field.php:105\nStack trace:\n#0 /var/www/html/wp-includes/rest-api/endpoints/class-wp-rest-controller.php(458): Yoast\\WP\\SEO\\Routes\\Yoast_Head_REST_Field->for_post(Object(stdClass), ‘yoast_head’, Object(WP_REST_Request), ‘leaderboard’)\n#1 /var/www/html/wp-content/plugins/woocommerce-admin/src/API/Leaderboards.php(416): WP_REST_Controller->add_additional_fields_to_object(Object(stdClass), Object(WP_REST_Request))\n#2 /var/www/html/wp-content/plugins/woocommerce-admin/src/API/Leaderboards.php(395): Automattic\\WooCommerce\\Admin\\API\\Leaderboards->prepare_item_for_response(Object(stdClass), Object(WP_REST_Request))\n#3 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(1015): Automattic\\WooCommerce\\Admin\\API\\Leaderboards->get_allowed_items(Object(WP_REST_Request))\n#4 /var/www/html/wp-includes/rest-api.php(437): WP_REST_Server->dispatch(Object(WP_REST_Request))\n#5 /var/www/ht in /var/www/html/wp-content/plugins/wordpress-seo/src/routes/yoast-head-rest-field.php on line 105, referer: https://www.ebounty.gg/wp-admin/plugins.php?plugin_status=all&paged=1&s
    [Fri Jul 24 16:50:33.918647 2020] [php7:error] [pid 10893] [client 172.31.6.205:29958] PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /var/www/html/wp-content/plugins/wordpress-seo/src/routes/yoast-head-rest-field.php:105\nStack trace:\n#0 /var/www/html/wp-includes/rest-api/endpoints/class-wp-rest-controller.php(458): Yoast\\WP\\SEO\\Routes\\Yoast_Head_REST_Field->for_post(Object(stdClass), ‘yoast_head’, Object(WP_REST_Request), ‘leaderboard’)\n#1 /var/www/html/wp-content/plugins/woocommerce-admin/src/API/Leaderboards.php(416): WP_REST_Controller->add_additional_fields_to_object(Object(stdClass), Object(WP_REST_Request))\n#2 /var/www/html/wp-content/plugins/woocommerce-admin/src/API/Leaderboards.php(395): Automattic\\WooCommerce\\Admin\\API\\Leaderboards->prepare_item_for_response(Object(stdClass), Object(WP_REST_Request))\n#3 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(1015): Automattic\\WooCommerce\\Admin\\API\\Leaderboards->get_allowed_items(Object(WP_REST_Request))\n#4 /var/www/html/wp-includes/rest-api.php(437): WP_REST_Server->dispatch(Object(WP_REST_Request))\n#5 /var/www/ht in /var/www/html/wp-content/plugins/wordpress-seo/src/routes/yoast-head-rest-field.php on line 105, referer: https://www.ebounty.gg/wp-admin/plugins.php?plugin_status=all&paged=1&s
    [Fri Jul 24 16:50:39.417678 2020] [php7:error] [pid 10699] [client 172.31.6.205:29978] PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /var/www/html/wp-content/plugins/wordpress-seo/src/routes/yoast-head-rest-field.php:105\nStack trace:\n#0 /var/www/html/wp-includes/rest-api/endpoints/class-wp-rest-controller.php(458): Yoast\\WP\\SEO\\Routes\\Yoast_Head_REST_Field->for_post(Object(stdClass), ‘yoast_head’, Object(WP_REST_Request), ‘leaderboard’)\n#1 /var/www/html/wp-content/plugins/woocommerce-admin/src/API/Leaderboards.php(416): WP_REST_Controller->add_additional_fields_to_object(Object(stdClass), Object(WP_REST_Request))\n#2 /var/www/html/wp-content/plugins/woocommerce-admin/src/API/Leaderboards.php(395): Automattic\\WooCommerce\\Admin\\API\\Leaderboards->prepare_item_for_response(Object(stdClass), Object(WP_REST_Request))\n#3 /var/www/html/wp-includes/rest-api/class-wp-rest-server.php(1015): Automattic\\WooCommerce\\Admin\\API\\Leaderboards->get_allowed_items(Object(WP_REST_Request))\n#4 /var/www/html/wp-includes/rest-api.php(437): WP_REST_Server->dispatch(Object(WP_REST_Request))\n#5 /var/www/ht in /var/www/html/wp-content/plugins/wordpress-seo/src/routes/yoast-head-rest-field.php on line 10

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support devnihil

    (@devnihil)

    @ullasaugustine Can you please let us know if the error resolves if you disable the REST API: Head endpoint feature of the Yoast SEO plugin? You can do this by performing the following actions:

      ? In WordPress, go to SEO>General>Features
      ? Set ‘REST API: Head endpoint’ to ‘Off’
      ? Click ‘Save Changes’
    Thread Starter ullasaugustine

    (@ullasaugustine)

    Yes,

    Fixed the issue.

    Thanks for your support.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[NSFW] Unable to create /update post/page’ is closed to new replies.