Support » Plugin: WP-Appbox » Fatal error in Gutenberg

  • Resolved izorg

    (@izorg)


    WordPress 5.0
    PHP 7.2
    WP-Appbox 4.1.1
    cURL enabled

    Open Gutenberg, add WP-Appbox, got error 500 on /wp-json/wp/v2/block-renderer/wp-appbox/appbox?context=edit&_locale=user, reload the page/draft, got error (WP_DEBUG true)

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function wpAppbox_createAppbox(), 1 passed in /wp-content/plugins/wp-appbox/wp-appbox.php on line 973 and exactly 2 expected in /wp-content/plugins/wp-appbox/wp-appbox.php:369 Stack trace: #0 /wp-content/plugins/wp-appbox/wp-appbox.php(973): wpAppbox_createAppbox(Array) #1 /wp-includes/class-wp-block-type.php(109): wpAppbox_renderGutenberg(Array, '') #2 /wp-includes/blocks.php(193): WP_Block_Type->render(Array, '') #3 /wp-includes/blocks.php(251): render_block(Array) #4 /wp-includes/class-wp-hook.php(286): do_blocks('<!-- wp:wp-appb...') #5 /wp-includes/plugin.php(203): WP_Hook->apply_filters('<!-- wp:wp-appb...', Array) #6 /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1520): apply_filters('the_content', '<!-- wp:wp-appb...') #7 /home/hosting/ww in /wp-content/plugins/wp-appbox/wp-appbox.php on line 369

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Marcelismus

    (@marcelismus)

    Please try version 4.1.2 and give me some feedback – looks like a “PHP 7.x thing”.

    Checked 4.1.1 with PHP 5.6 – no fatal error, but saving draft returns the message “Updating failed” (but draft saved). After upgrading to 4.1.2 & PHP 7.2 – no fatal error, but still message “Updating failed”. I can’t recognize the source of the error.

    Also want to mention that in all cases block in the editor looks gray with the message in the center “Error loading block: The response is not a valid JSON response.”

    Plugin Author Marcelismus

    (@marcelismus)

    Are you getting any preview or shortcode box in Gutenberg? Any additional plugins for Gutenberg?

    No preview, no shortcode. The installation is clean without plugins. The editor screen looks like this https://snag.gy/4vfzLo.jpg.

    • This reply was modified 6 months, 1 week ago by  izorg.
    Plugin Author Marcelismus

    (@marcelismus)

    Could you please check it with the “live rendering” disabled (WP-Appbox settings – tab “Advanced”). I can’t reproduce it atm on my two installations. :-/

    Tried, nothing changed. Message “Updating failed” appeared on POST /wp-json/wp/v2/posts/53?_locale=user with body

    
    {"title":"Test","content":"<!-- wp:wp-appbox/appbox {\"appID\":\"com.izorg.munchkin\",\"storeID\":\"googleplay\"} /-->","id":53}
    

    and response

    
    <pre>//=================================================</pre><pre>APP-ID: com.izorg.munchkin</pre><pre>function: wpAppbox_hasCachedData() ---> App has valid cached data</pre><pre>function: wpAppbox_createAppbox() ---> Runtime: 0.0041100978851318 seconds
    </pre><pre>//=================================================
    
    </pre>{"id":53,"date":"2018-12-11T15:43:58","date_gmt":"2018-12-11T15:43:58","guid":{"rendered":"https:\/\/zavr.info\/?p=53","raw":"https:\/\/zavr.info\/?p=53"},"modified":"2018-12-11T15:43:58","modified_gmt":"2018-12-11T15:43:58","password":"","slug":"","status":"draft","type":"post","link":"https:\/\/zavr.info\/?p=53","title":{"raw":"Test","rendered":"Test"},"content":{"raw":"<!-- wp:wp-appbox\/appbox {\"appID\":\"com.izorg.munchkin\",\"storeID\":\"googleplay\"} \/-->","rendered":"<div class=\"wp-block-shortcode wp-block-appbox\"><label><img src=\"https:\/\/zavr.info\/wp-content\/plugins\/wp-appbox\/editor\/tinymce\/appbox.btn.png\" class=\"dashicon dashicons-shortcode\" aria-hidden=\"true\" width=\"20\" height=\"20\" \/>WP-Appbox<\/label><textarea class=\"editor-plain-text input-control\" id=\"blocks-shortcode-input-1\" rows=\"1\" style=\"overflow: hidden; word-wrap: break-word; resize: none; height: 37px;\" disabled><!-- WP-Appbox (Version: 4.1.2 \/\/ Store: googleplay \/\/ ID: com.izorg.munchkin) -->\n<div class=\"wpappbox wpappbox-c30ffec713dc7df106e4620491c8eb72 googleplay simple\">\n\t<div class=\"qrcode\"><img src=\"https:\/\/chart.googleapis.com\/chart?cht=qr&chl=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.izorg.munchkin&chs=200x200&chld=L|0\" alt=\"Munchkin Level Counter\" \/><\/div>\n\t<div class=\"appicon\">\n\t\t<a target=\"_blank\" rel=\"nofollow\" href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.izorg.munchkin\"><img src=\"\/\/lh3.googleusercontent.com\/Hu0in2RZiiiI3xPKezW54L_UEHCE10fY9YBytkcmxgiO7rkKj_HHRq3aD0NidhN8GQw=s180\" alt=\"Munchkin Level Counter\" \/><\/a>\n\t<\/div>\n\t<div class=\"applinks\">\n\t\t<div class=\"appbuttons\">\n\t\t\t<a target=\"_blank\" rel=\"nofollow\" href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.izorg.munchkin\">Download<\/a>\n\t\t\t<span onMouseOver=\"jQuery('.wpappbox-c30ffec713dc7df106e4620491c8eb72 .qrcode').show();\" onMouseOut=\"jQuery('.wpappbox-c30ffec713dc7df106e4620491c8eb72 .qrcode').hide();\">QR-Code<\/span>\n\t\t<\/div>\n\t<\/div>\n\t<div class=\"appdetails\">\n\t\t<div class=\"apptitle\"><a href=\"https:\/\/zavr.info\/?p=53?wpappbox_reload_cache&app_cache_id=c30ffec713dc7df106e4620491c8eb72\" title=\"Renew cached data of this app\" class=\"reload-link\">↻<\/a> <a target=\"_blank\" rel=\"nofollow\" href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.izorg.munchkin\" title=\"Munchkin Level Counter\" class=\"apptitle\">Munchkin Level Counter<\/a><\/div>\n\t\t<div class=\"developer\">Developer: <a target=\"_blank\" rel=\"nofollow\" href=\"https:\/\/play.google.com\/store\/apps\/developer?id=Viacheslav+Zavoruev\">Viacheslav Zavoruev<\/a><\/div>\n\t\t<div class=\"price\"><span>Price: Free<sup>+<\/sup><\/span> <div title=\"4.5 of 5 stars\" class=\"rating-stars stars-monochrome stars45\"><\/div><\/div>\n\t<\/div>\n<\/div><!-- \/WP-Appbox --><\/textarea><\/div>","protected":false,"block_version":1},"excerpt":{"raw":"","rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"permalink_template":"https:\/\/zavr.info\/2018\/12\/11\/%postname%\/","generated_slug":"test","_links":{"self":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53"}],"collection":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":2,"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":55,"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53\/revisions\/55"}],"wp:attachment":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/tags?post=53"}],"wp:action-publish":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53"}],"wp:action-unfiltered-html":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53"}],"wp:action-sticky":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53"}],"wp:action-assign-author":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53"}],"wp:action-create-categories":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53"}],"wp:action-assign-categories":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53"}],"wp:action-create-tags":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53"}],"wp:action-assign-tags":[{"href":"https:\/\/zavr.info\/wp-json\/wp\/v2\/posts\/53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
    

    Checked autosave without WP-Appbox, response is JSON, maybe this is the reason

    UPDATE: after disabling “Error output” (was “Only print on site”) in Advanced options everything works as expected! Thank you for help

    • This reply was modified 6 months, 1 week ago by  izorg.
    • This reply was modified 6 months, 1 week ago by  izorg.
    Plugin Author Marcelismus

    (@marcelismus)

    Ok, thanks for hinting. I’ll take a look.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Fatal error in Gutenberg’ is closed to new replies.