verbb / super-table

Super-charge your Craft workflow using Super Table.
MIT License
317 stars 47 forks source link

Call to undefined method verbb\base\BaseHelper::setFileLogging() #353

Closed bkmorse closed 4 years ago

bkmorse commented 4 years ago

Description

updating plugin from 2.4.7 to 2.4.8

Steps to reproduce

composer require verbb/super-table:2.4.8

then visit admin/settings/plugins in my browser

Additional info

plugin version 2.4.7 craft version 3.4.13

Stack trace: `Call to undefined method verbb\base\BaseHelper::setFileLogging()

  1. in /var/www/html/vendor/verbb/super-table/src/base/PluginTrait.phpat line 61 52535455565758596061626364 'service' => SuperTableService::class, 'matrixService' => SuperTableMatrixService::class, ]);

    BaseHelper::registerModule();

    }

    private function _setLogging() { BaseHelper::setFileLogging('super-table'); }

}

  1. in /var/www/html/vendor/verbb/super-table/src/SuperTable.php at line 55– verbb\supertable\SuperTable::_setLogging() 49505152535455565758596061 { parent::init();

    self::$plugin = $this;
    
    $this->_setPluginComponents();
    $this->_setLogging();
    $this->_registerCpRoutes();
    $this->_registerVariables();
    $this->_registerFieldTypes();
    $this->_registerElementTypes();
    $this->_registerIntegrations();
    $this->_registerProjectConfigEventListeners();
  2. in /var/www/html/vendor/yiisoft/yii2/base/BaseObject.php at line 109– verbb\supertable\SuperTable::init()
  3. in /var/www/html/vendor/yiisoft/yii2/base/Module.php at line 158– yii\base\BaseObject::__construct(['name' => 'Super Table', 'version' => '2.4.8', 'description' => 'Super-charge your Craft workflow...', 'developer' => 'Verbb', ...])
  4. in /var/www/html/vendor/craftcms/cms/src/base/Plugin.php at line 115– yii\base\Module::__construct('super-table', craft\web\Application, ['name' => 'Super Table', 'version' => '2.4.8', 'description' => 'Super-charge your Craft workflow...', 'developer' => 'Verbb', ...]) 109110111112113114115116117118119120121 $this->controllerNamespace = $namespace . '\console\controllers'; } else { $this->controllerNamespace = $namespace . '\controllers'; } }

    parent::__construct($id, $parent, $config);

    }

    /**

    • @inheritdoc */ public function getHandle(): string
  5. craft\base\Plugin::__construct('super-table', craft\web\Application, ['name' => 'Super Table', 'version' => '2.4.8', 'description' => 'Super-charge your Craft workflow...', 'developer' => 'Verbb', ...])
  6. in /var/www/html/vendor/yiisoft/yii2/di/Container.php at line 400– ReflectionClass::newInstanceArgs(['super-table', craft\web\Application, ['basePath' => '/var/www/html/vendor/verbb/super...', 'name' => 'Super Table', 'version' => '2.4.8', 'description' => 'Super-charge your Craft workflow...', ...]])
  7. in /var/www/html/vendor/yiisoft/yii2/di/Container.php at line 159– yii\di\Container::build('verbb\supertable\SuperTable', ['super-table', craft\web\Application], ['basePath' => '/var/www/html/vendor/verbb/super...', 'name' => 'Super Table', 'version' => '2.4.8', 'description' => 'Super-charge your Craft workflow...', ...])
  8. in /var/www/html/vendor/yiisoft/yii2/BaseYii.php at line 365– yii\di\Container::get('verbb\supertable\SuperTable', ['super-table', craft\web\Application], ['basePath' => '/var/www/html/vendor/verbb/super...', 'name' => 'Super Table', 'version' => '2.4.8', 'description' => 'Super-charge your Craft workflow...', ...])
  9. in /var/www/html/vendor/craftcms/cms/src/services/Plugins.php at line 905– yii\BaseYii::createObject(['basePath' => '/var/www/html/vendor/verbb/super...', 'name' => 'Super Table', 'version' => '2.4.8', 'description' => 'Super-charge your Craft workflow...', ...], ['super-table', craft\web\Application]) 899900901902903904905906907908909910911 $config = ArrayHelper::merge($config, $this->pluginConfigs[$handle]); } }

    // Create the plugin
    /** @var Plugin $plugin */
    $plugin = Craft::createObject($config, [$handle, Craft::$app]);
    $this->_setPluginMigrator($plugin, $info['id'] ?? null);
    return $plugin;

    }

    /**

    • Returns info about all of the plugins we can find, whether they’re installed or not.
  10. in /var/www/html/vendor/craftcms/cms/src/services/Plugins.php at line 228– craft\services\Plugins::createPlugin('super-table', ['id' => '20', 'handle' => 'super-table', 'version' => '2.4.7', 'schemaVersion' => '2.2.1', ...]) 222223224225226227228229230231232233234 $this->_enabledPluginInfo[$handle] = $row; }

    foreach ($this->_enabledPluginInfo as $handle => $row) {
        try {
            $plugin = $this->createPlugin($handle, $row);
        } catch (InvalidPluginException $e) {
            $plugin = null;
        }
    
        if ($plugin !== null) {
            // If we're not updating, check if the plugin's version number changed, but not its schema version.
  11. in /var/www/html/vendor/craftcms/cms/src/base/ApplicationTrait.php at line 1402– craft\services\Plugins::loadPlugins() 1396139713981399140014011402140314041405140614071408 $this->_registerConfigListeners();

    // Register all the listeners for invalidating GraphQL Cache.
    $this->_registerGraphQlListeners();
    
    // Load the plugins
    $this->getPlugins()->loadPlugins();
    
    $this->_isInitialized = true;
    
    // Fire an 'init' event
    if ($this->hasEventHandlers(WebApplication::EVENT_INIT)) {
        $this->trigger(WebApplication::EVENT_INIT);
  12. in /var/www/html/vendor/craftcms/cms/src/web/Application.php at line 103– craft\web\Application::_postInit() 979899100101102103104105106107108109 public function init() { $this->state = self::STATE_INIT; $this->_preInit(); parent::init(); $this->ensureResourcePathExists(); $this->_postInit(); $this->debugBootstrap(); }

    /**

    • @inheritdoc */
  13. in /var/www/html/vendor/yiisoft/yii2/base/BaseObject.php at line 109– craft\web\Application::init()
  14. in /var/www/html/vendor/yiisoft/yii2/base/Application.php at line 206– yii\base\BaseObject::__construct(['env' => 'local', 'components' => ['config' => craft\services\Config, 'api' => ['class' => 'craft\services\Api'], 'assets' => ['class' => 'craft\services\Assets'], 'assetIndexer' => ['class' => 'craft\services\AssetIndexer'], ...], 'id' => 'CraftCMS', 'name' => 'Craft CMS', ...])
  15. in /var/www/html/vendor/craftcms/cms/src/web/Application.php at line 91– yii\base\Application::__construct(['env' => 'local', 'components' => ['config' => craft\services\Config, 'api' => ['class' => 'craft\services\Api'], 'assets' => ['class' => 'craft\services\Assets'], 'assetIndexer' => ['class' => 'craft\services\AssetIndexer'], ...], 'id' => 'CraftCMS', 'name' => 'Craft CMS', ...]) 85868788899091929394959697 *

    • @param array $config */ public function construct(array $config = []) { Craft::$app = $this; parent::construct($config); }

    /**

    • Initializes the application. */ public function init()
  16. craft\web\Application::__construct(['vendorPath' => '/var/www/html/vendor', 'env' => 'local', 'components' => ['config' => craft\services\Config, 'api' => ['class' => 'craft\services\Api'], 'assets' => ['class' => 'craft\services\Assets'], 'assetIndexer' => ['class' => 'craft\services\AssetIndexer'], ...], 'id' => 'CraftCMS', ...])
  17. in /var/www/html/vendor/yiisoft/yii2/di/Container.php at line 400– ReflectionClass::newInstanceArgs([['vendorPath' => '/var/www/html/vendor', 'env' => 'local', 'components' => ['config' => craft\services\Config, 'api' => ['class' => 'craft\services\Api'], 'assets' => ['class' => 'craft\services\Assets'], 'assetIndexer' => ['class' => 'craft\services\AssetIndexer'], ...], 'id' => 'CraftCMS', ...]])
  18. in /var/www/html/vendor/yiisoft/yii2/di/Container.php at line 159– yii\di\Container::build('craft\web\Application', [], ['vendorPath' => '/var/www/html/vendor', 'env' => 'local', 'components' => ['config' => craft\services\Config, 'api' => ['class' => 'craft\services\Api'], 'assets' => ['class' => 'craft\services\Assets'], 'assetIndexer' => ['class' => 'craft\services\AssetIndexer'], ...], 'id' => 'CraftCMS', ...])
  19. in /var/www/html/vendor/yiisoft/yii2/BaseYii.php at line 365– yii\di\Container::get('craft\web\Application', [], ['vendorPath' => '/var/www/html/vendor', 'env' => 'local', 'components' => ['config' => craft\services\Config, 'api' => ['class' => 'craft\services\Api'], 'assets' => ['class' => 'craft\services\Assets'], 'assetIndexer' => ['class' => 'craft\services\AssetIndexer'], ...], 'id' => 'CraftCMS', ...])
  20. in /var/www/html/vendor/craftcms/cms/bootstrap/bootstrap.php at line 245– yii\BaseYii::createObject(['vendorPath' => '/var/www/html/vendor', 'env' => 'local', 'components' => ['config' => craft\services\Config, 'api' => ['class' => 'craft\services\Api'], 'assets' => ['class' => 'craft\services\Assets'], 'assetIndexer' => ['class' => 'craft\services\AssetIndexer'], ...], 'id' => 'CraftCMS', ...]) 239240241242243244245246247248249250251if (defined('CRAFT_SITE') || defined('CRAFT_LOCALE')) { $config['components']['sites']['currentSite'] = defined('CRAFT_SITE') ? CRAFT_SITE : CRAFT_LOCALE; }

// Initialize the application /* @var \craft\web\Application|craft\console\Application $app / $app = Craft::createObject($config);

// If there was a max_input_vars error, kill the request before we start processing it with incomplete data if ($lastError && strpos($lastError['message'], 'max_input_vars') !== false) { throw new ErrorException($lastError['message']); }

  1. in /var/www/html/vendor/craftcms/cms/bootstrap/web.php at line 51– require('/var/www/html/vendor/craftcms/cm...') 45464748495051 // Load Craft // -----------------------------------------------------------------------------

$appType = 'web';

return require DIR . '/bootstrap.php';

  1. in /var/www/html/public_html/index.php at line 21– require('/var/www/html/vendor/craftcms/cm...') `
engram-design commented 4 years ago

That's odd, it seems like it hasn't updated a dependancy.

Can you run composer require verbb/super-table:2.4.9

Failing that, run composer update verbb/base then composer require verbb/super-table:2.4.9

bkmorse commented 4 years ago

Saw you fixed it in 2.4.9, it fixed my situation, thanks.

engram-design commented 4 years ago

In addition, seems like this might be a composer issue - https://github.com/composer/composer/issues/8734

Running composer require verbb/super-table:2.4.9 --update-with-all-dependencies should fix this. as well.