Skip to content

🐞 Bug Report: DID install method is broken due to leftover ( new Updater\Updater( $did ) )->run() #507

@kasparsd

Description

@kasparsd

Detailed Description

When trying to install a plugin via DID "direct install" method, I get the following error:

PHP Fatal error:  Uncaught Error: Call to undefined method FAIR\Updater\Updater::run() in /var/www/html/wp-content/plugins/fair-32405b/inc/packages/admin/namespace.php:127
Stack trace:
#0 /var/www/html/wp-includes/class-wp-hook.php(341): FAIR\Packages\Admin\handle_did_during_ajax(false, 'plugin_informat...', Object(stdClass))
#1 /var/www/html/wp-includes/plugin.php(205): WP_Hook->apply_filters(false, Array)
#2 /var/www/html/wp-admin/includes/plugin-install.php(145): apply_filters('plugins_api', false, 'plugin_informat...', Object(stdClass))
#3 /var/www/html/wp-admin/includes/ajax-actions.php(4485): plugins_api('plugin_informat...', Object(stdClass))
#4 /var/www/html/wp-includes/class-wp-hook.php(341): wp_ajax_install_plugin('')
#5 /var/www/html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters('', Array)
#6 /var/www/html/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#7 /var/www/html/wp-admin/admin-ajax.php(192): do_action('wp_ajax_install...')
#8 {main}
  thrown in /var/www/html/wp-content/plugins/fair-32405b/inc/packages/admin/namespace.php on line 127

because of the leftover ( new Updater\Updater( $did ) )->run() call in handle_did_during_ajax():

( new Updater\Updater( $did ) )->run();

because there is no run() defined in the Updater\Updater class. It was removed in 1.4.0 https://github.com/fairpm/fair-plugin/pull/484/changes#diff-afbe3d2123aee77f501cb679d4c7cca1e7e30559520405acc103619492f3639cL86

Expected Behavior

Current Behavior

Steps to Reproduce

  1. Activate FAIR Connect
  2. Go to Plugins > Add Plugin > Direct Install (tab)
  3. Paste in did:plc:deoui6ztyx6paqajconl67rz
  4. Click on Install Plugin on the modal

Context (Environment)

FAIR Connect 1.4.0

Possible Solution

Remove left-over calls to FAIR\Updater\Updater::run().

Possible Implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions