• Resolved ColinD

    (@colind)


    When I try to save a post or page I get at 500 error

    POST updated conten to
    https://www.vem-co.com/wp-json/wp/v2/pages/1772?_locale=user

    {
    "code": "internal_server_error",
    "message": "<p>There has been a critical error on this website.<\/p><p><a href=\"https:\/\/ww.wp.xz.cn\/documentation\/article\/faq-troubleshooting\/\">Learn more about troubleshooting WordPress.<\/a><\/p>",
    "data": {
    "status": 500,
    "error": {
    "type": 1,
    "message": "Uncaught TypeError: array_merge(): Argument #1 must be of type array, string given in \/public_html\/wp-content\/plugins\/sg-cachepress\/core\/Helper\/Update_Queue_Trait.php:22\nStack trace:\n#0 \/public_html\/wp-content\/plugins\/sg-cachepress\/core\/Helper\/Update_Queue_Trait.php(22): array_merge('', Array)\n#1 \/public_html\/wp-content\/plugins\/sg-cachepress\/core\/Supercacher\/Supercacher_Posts.php(178): SiteGround_Optimizer\\Supercacher\\Supercacher_Posts->update_queue(Array)\n#2 \/public_html\/wp-includes\/class-wp-hook.php(326): SiteGround_Optimizer\\Supercacher\\Supercacher_Posts->purge_all_post_cache(1772)\n#3 \/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)\n#4 \/public_html\/wp-includes\/plugin.php(517): WP_Hook->do_action(Array)\n#5 \/public_html\/wp-includes\/post.php(5060): do_action('save_post', 1772, Object(WP_Post), true)\n#6 \/public_html\/wp-includes\/post.php(5162): wp_insert_post(Array, true, false)\n#7 \/public_html\/wp-includes\/rest-api\/endpoints\/class-wp-rest-posts-controller.php(946): wp_update_post(Array, true, false)\n#8 \/public_html\/wp-includes\/rest-api\/class-wp-rest-server.php(1292): WP_REST_Posts_Controller->update_item(Object(WP_REST_Request))\n#9 \/public_html\/wp-includes\/rest-api\/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '\/wp\/v2\/pages\/(?...', Array, NULL)\n#10 \/public_html\/wp-includes\/rest-api\/class-wp-rest-server.php(439): WP_REST_Server->dispatch(Object(WP_REST_Request))\n#11 \/public_html\/wp-includes\/rest-api.php(449): WP_REST_Server->serve_request('\/wp\/v2\/pages\/17...')\n#12 \/public_html\/wp-includes\/class-wp-hook.php(324): rest_api_loaded(Object(WP))\n#13 \/public_html\/wp-includes\/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)\n#14 \/public_html\/wp-includes\/plugin.php(565): WP_Hook->do_action(Array)\n#15 \/public_html\/wp-includes\/class-wp.php(418): do_action_ref_array('parse_request', Array)\n#16 \/public_html\/wp-includes\/class-wp.php(813): WP->parse_request('')\n#17 \/public_html\/wp-includes\/functions.php(1336): WP->main('')\n#18 \/public_html\/wp-blog-header.php(16): wp()\n#19 \/public_html\/index.php(17): require('\/home\/customer\/...')\n#20 {main}\n thrown",
    "file": "\/public_html\/wp-content\/plugins\/sg-cachepress\/core\/Helper\/Update_Queue_Trait.php",
    "line": 22
    }
    },
    "additional_errors": []
    }
Viewing 1 replies (of 1 total)
  • Plugin Support stefanstefanov

    (@stefanstefanov)

    Hello @colind

    An incompatibility with the application plugins likely causes the error. You can try deactivating them and enabling them one by one in order to be able to pinpoint the culprit. Still it would be best to post a support request from your SiteGround User Area, so our team can review the case, investigate and provide more information on the matter.

    Best regards,

    Stefan Stefanov

Viewing 1 replies (of 1 total)

The topic ‘REST API fatal error on save’ is closed to new replies.