• Resolved Thérèse

    (@ciacopink)


    Hello. Thanks for all your nice plugins.
    By the way, I got a fatal error.
    Only certain pages that I happened to try to modify in a page, I get an error when I try to open it with edit. The display is normal.
    I don’t know if it is caused by something text in this page. For now, I have hidden the page with the error.

    Some other pages do not have this error.

    I have not been able to confirm whether other pages or posts get this error, as there are too many of them.

    SlimSeo version 4.3.0

    Fatal error: Uncaught TypeError: SlimSEO\RestApi::prepare_value_for_post(): Return value must be of type array, null returned in /xxxxxwp-content/plugins/slim-seo/src/RestApi.php:64 Stack trace:

    #0 /xxxxxwp-includes/rest-api/fields/class-wp-rest-meta-fields.php(127): SlimSEO\RestApi->prepare_value_for_post(Array, Object(WP_REST_Request), Array)
    #1 /xxxxxwp-includes/rest-api/fields/class-wp-rest-meta-fields.php(94): WP_REST_Meta_Fields->prepare_value_for_response(‘a:1:{s:7:”noind…’, Object(WP_REST_Request), Array)
    #2 /xxxxxwp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(2029): WP_REST_Meta_Fields->get_value(154516, Object(WP_REST_Request))
    #3 /xxxxxwp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(635): WP_REST_Posts_Controller->prepare_item_for_response(Object(WP_Post), Object(WP_REST_Request))
    #4 /xxxxxwp-includes/rest-api/class-wp-rest-server.php(1292): WP_REST_Posts_Controller->get_item(Object(WP_REST_Request))
    #5 /xxxxxwp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request(Object(WP_REST_Request), ‘/wp/v2/pages/(?…’, Array, NULL)
    #6 /xxxxxwp-includes/rest-api.php(576): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #7 /xxxxxwp-includes/rest-api.php(2957): rest_do_request(Object(WP_REST_Request))
    #8 [internal function]: rest_preload_api_request(Array, ‘/wp/v2/pages/15…’)
    #9 /xxxxxwp-includes/block-editor.php(753): array_reduce(Array, ‘rest_preload_ap…’, Array)
    #10 /xxxxxwp-admin/edit-form-blocks.php(77): block_editor_rest_api_preload(Array, Object(WP_Block_Editor_Context))
    #11 /xxxxxwp-admin/post.php(187): require(‘/home/xxxxx/…’)
    #12 {main} thrown in /xxxxxwp-content/plugins/slim-seo/src/RestApi.php on line 64

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi @ciacopink ,

    Can you share us a temporary login on your staging site to check the issue? We have a fix for this, but we need to check the root cause of the issue.

    Thread Starter Thérèse

    (@ciacopink)

    Sorry, I don’t like to have a third party log in to my wooSHOP, as I have customer information on it.
    However, if I turn off the SEO plugin, that page can be modified.
    Also, when I asked AI, they responded as follows, but I have no idea what it means as I don’t understand the programme. Only that page can be displayed but not modified, but it is currently hidden. We are fine with this situation because you cannot log in to our site and we do not know why. I will delete this page. Sorry, I can’t give you my login details.

    Perhaps you already know this. So you want to check that our page.

    Chatgpt
    A closer analysis of the error message shows that Slim SEO received an unexpected value (NULL) when it tried to retrieve the page metadata via the REST API, causing it to crash.

    Core of the error.
    prepare_value_for_post() is trying to retrieve metadata from the wp_postmeta table via the REST API, but returns NULL when it should return an array (array).
    WP_REST_Meta_Fields->get_value() is trying to get the meta_value value ‘a:1:{s:7: “noind…” and is trying to get the value ‘a:1:{s:7: “noind…”’, resulting in an error.
    This is serialised (serialize()) data, so the data may be corrupted.

    Plugin Author Anh Tran

    (@rilwis)

    I understand. Can you please try this version to see if the bug is fixed? We fixed it in a recent commit. If that works, we’ll release a new version with it.

    Thread Starter Thérèse

    (@ciacopink)

    Thank you so much.
    by the way,
    Which button on the page you told me to download it from?

    Blue Download on the left

    More to the right of that

    slim-seo-zip under the blue button on the left

    More to the right of that

    Plugin Author Anh Tran

    (@rilwis)

    Any button should work. But it’s simpler to choose More => Download file, since it’s the specific .zip file of the plugin.

    Thread Starter Thérèse

    (@ciacopink)

    It was the same version 4.3.0 as before, so I wondered why, but with the download version you just told me about, it was fine.
    I was able to open the page where the problem was occurring and fix it. So the next time there is an official version update, I should just update that too?
    Thank you kindly.

    Plugin Author Anh Tran

    (@rilwis)

    The version you just downloaded above has a fix for this issue. This fix will be available in the next version. So when the next version is released, you just need to update.

    Thread Starter Thérèse

    (@ciacopink)

    Thank you very much for your very thorough and quick response.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.