• Resolved IndikatorDesign

    (@indikatordesign)


    Hey there. In principle, it is a pretty cool tool to test snippets etc.

    But I cannot communicate with WP. I simply try to get some values from the database to check if it is possible to interact with the system but it fails.

    If I try to get something from the database, eg with

    _dump( get_option( ‘siteurl’ ) );

    then it throws some errors related to the RestController:

    #0 /var/www/vhosts/folder.de/domain.com/public_html/wp-content/plugins/wp-console/includes/Core/Console/RestController.php(137) : eval()'d code(7): WPConsole\Core\Console\Psy\Shell->handleError(8, 'Undefined prope...', '/var/www/vhosts...', 7, Array)
    #1 /var/www/vhosts/folder.de/domain.com/public_html/wp-content/plugins/wp-console/includes/Core/Console/RestController.php(137): eval()
    #2 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/rest-api/class-wp-rest-server.php(1143): WPConsole\Core\Console\RestController->create_item(Object(WP_REST_Request))
    #3 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/rest-api/class-wp-rest-server.php(990): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wp-console/v1/...', Array, NULL)
    #4 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/rest-api/class-wp-rest-server.php(414): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #5 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/rest-api.php(394): WP_REST_Server->serve_request('/wp-console/v1/...')
    #6 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/class-wp-hook.php(307): rest_api_loaded(Object(WP))
    #7 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
    #8 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/plugin.php(524): WP_Hook->do_action(Array)
    #9 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/class-wp.php(398): do_action_ref_array('parse_request', Array)
    #10 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/class-wp.php(770): WP->parse_request('')
    #11 /var/www/vhosts/folder.de/domain.com/public_html/wp-includes/functions.php(1330): WP->main('')
    #12 /var/www/vhosts/folder.de/domain.com/public_html/wp-blog-header.php(16): wp()
    #13 /var/www/vhosts/folder.de/domain.com/public_html/index.php(17): require('/var/www/vhosts...')
    #14 {main}

    Any idea how to fix it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter IndikatorDesign

    (@indikatordesign)

    PHP Notice: Undefined property: WPConsole\Core\Console\RestController::$prefix in /var/www/vhosts/folder.de/domain.com/public_html/wp-content/plugins/wp-console/includes/Core/Console/RestController.php(137) : eval()'d code on line 7

    Thread Starter IndikatorDesign

    (@indikatordesign)

    WP 6.0
    WP Console 2.2.1

    Thread Starter IndikatorDesign

    (@indikatordesign)

    It seems that it was an incorrect declaration of a function in a script I was trying to test.

    Now it works.

    Thanks for your great job. Really useful.

    Plugin Author Edi Amin

    (@ediamin)

    Glad to know that your issue is resolved. Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot communicate with WP’ is closed to new replies.