• Resolved strarsis

    (@strarsis)


    Hi,

    when using the WP CLI during deployment (roots.io Trellis with a Bedrock WordPress site),
    there is an error that prevents WP CLI from being used:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function
    Getwid\RestAPI::taxonomy_schema(), 0 passed in
    /srv/www/example.com/releases/20191210025922/web/wp/wp-includes/rest-
    api/class-wp-rest-server.php on line 1165 and exactly 1 expected in /srv/www/
    example.com/releases/20191210025922/web/app/plugins/getwid/includes/r
    est-api.php:99
    Stack trace:
    #0 /srv/www/example.com/releases/20191210025922/web/wp/wp-
    includes/rest-api/class-wp-rest-server.php(1165):
    Getwid\RestAPI->taxonomy_schema()
    #1 /srv/www/example.com/releases/20191210025922/web/wp/wp-
    includes/rest-api/class-wp-rest-server.php(1110):
    WP_REST_Server->get_data_for_route('/getwid/v1/taxo...', Array, 'help')
    #2 /srv/www/example.com/releases/20191210025922/web/wp/wp-
    includes/rest-api/class-wp-rest-server.php(1033):
    WP_REST_Server->get_data_for_routes(Array, 'help')
    #3 /srv/www/example.com/releases/20191210025922/web/wp/wp-
    includes/rest-api/class-wp-rest-server.php(946):
    WP_REST_Server->get_index(Object(WP_RES in /srv/www/example.com/relea
    ses/20191210025922/web/app/plugins/getwid/includes/rest-api.php on line 99
    Error: There has been a critical error on your website.Learn more about
    debugging in WordPress. There has been a critical error on your website.
    
    [...]Error: There has been a critical error on your website.Learn more about debugging in WordPress.
    There has been a critical error on your website.[...]

    Thanks!

    • This topic was modified 4 years, 11 months ago by strarsis.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    I get the same error here.

    In facts, the problem also occurs with terms_schema() and templates_schema()

    The worst, is that the $request param is not unsed in all theses functions.

    So letting a default value to NULL makes the trick.

    in wp-content/plugins/getwid/includes/rest-api.php:

    public function taxonomy_schema( $request ) {
    public function taxonomy_schema( $request=null ) {

    public function terms_schema( $request ) {
    public function terms_schema( $request=null ) {

    public function templates_schema( $request ) {
    public function templates_schema( $request=null ) {

    Hope it helps

    Plugin Contributor motopress

    (@motopress)

    @strarsis , @bastho

    Thank you for reporting this issue.
    It will be fixed in the next plugin update.

    Thread Starter strarsis

    (@strarsis)

    @motopress: Could you release a new update today in the near future? I really like this plugin but it interferes with other tools so I have to have it disabled it most the time.

    Plugin Contributor motopress

    (@motopress)

    @strarsis did you leave a review? ??

    Plugin Contributor motopress

    (@motopress)

    The issue is fixed in 1.5.0

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error when using wp cli’ is closed to new replies.