timmyomahony / craft-remote-sync

Sync your database and assets across Craft environments using a remote destination like AWS S3
https://plugins.craftcms.com/remote-sync
Other
12 stars 4 forks source link

Failed to instantiate component or class on Settings #51

Closed dwhoban closed 1 year ago

dwhoban commented 2 years ago

When I install this plugin I cannot access the settings page to configure the plugin. It returns the following error:

ReflectionException: Class "weareferal\remotecore\assets\remotecoresettings\RemoteCoreSettingsAsset" does not exist in /var/www/html/vendor/yiisoft/yii2/di/Container.php:507
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii2/di/Container.php(507): ReflectionClass->__construct('weareferal\\remo...')
#1 /var/www/html/vendor/yiisoft/yii2/di/Container.php(385): yii\di\Container->getDependencies('weareferal\\remo...')
#2 /var/www/html/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build('weareferal\\remo...', Array, Array)
#3 /var/www/html/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('weareferal\\remo...', Array, Array)
#4 /var/www/html/vendor/yiisoft/yii2/web/AssetManager.php(292): yii\BaseYii::createObject(Array)
#5 /var/www/html/vendor/yiisoft/yii2/web/AssetManager.php(265): yii\web\AssetManager->loadBundle('weareferal\\remo...', Array, true)
#6 /var/www/html/vendor/yiisoft/yii2/web/View.php(294): yii\web\AssetManager->getBundle('weareferal\\remo...')
#7 /var/www/html/vendor/weareferal/remote-sync/src/RemoteSync.php(141): yii\web\View->registerAssetBundle('weareferal\\remo...')
#8 /var/www/html/vendor/craftcms/cms/src/base/Plugin.php(203): weareferal\remotesync\RemoteSync->settingsHtml()
#9 /var/www/html/vendor/craftcms/cms/src/web/View.php(1610): craft\base\Plugin->craft\base\{closure}()
#10 /var/www/html/vendor/craftcms/cms/src/base/Plugin.php(204): craft\web\View->namespaceInputs(Object(Closure), 'settings')
#11 /var/www/html/vendor/craftcms/cms/src/controllers/PluginsController.php(103): craft\base\Plugin->getSettingsResponse()
#12 [internal function]: craft\controllers\PluginsController->actionEditPluginSettings('remote-sync', Object(weareferal\remotesync\RemoteSync))
#13 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#14 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#15 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('edit-plugin-set...', Array)
#16 /var/www/html/vendor/craftcms/cms/src/web/Application.php(301): yii\base\Module->runAction('plugins/edit-pl...', Array)
#17 /var/www/html/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('plugins/edit-pl...', Array)
#18 /var/www/html/vendor/craftcms/cms/src/web/Application.php(286): yii\web\Application->handleRequest(Object(craft\web\Request))
#19 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#20 /var/www/html/web/index.php(16): yii\base\Application->run()
#21 {main}

Next yii\di\NotInstantiableException: Failed to instantiate component or class "weareferal\remotecore\assets\remotecoresettings\RemoteCoreSettingsAsset". in /var/www/html/vendor/yiisoft/yii2/di/Container.php:509
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii2/di/Container.php(385): yii\di\Container->getDependencies('weareferal\\remo...')
#1 /var/www/html/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build('weareferal\\remo...', Array, Array)
#2 /var/www/html/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get('weareferal\\remo...', Array, Array)
#3 /var/www/html/vendor/yiisoft/yii2/web/AssetManager.php(292): yii\BaseYii::createObject(Array)
#4 /var/www/html/vendor/yiisoft/yii2/web/AssetManager.php(265): yii\web\AssetManager->loadBundle('weareferal\\remo...', Array, true)
#5 /var/www/html/vendor/yiisoft/yii2/web/View.php(294): yii\web\AssetManager->getBundle('weareferal\\remo...')
#6 /var/www/html/vendor/weareferal/remote-sync/src/RemoteSync.php(141): yii\web\View->registerAssetBundle('weareferal\\remo...')
#7 /var/www/html/vendor/craftcms/cms/src/base/Plugin.php(203): weareferal\remotesync\RemoteSync->settingsHtml()
#8 /var/www/html/vendor/craftcms/cms/src/web/View.php(1610): craft\base\Plugin->craft\base\{closure}()
#9 /var/www/html/vendor/craftcms/cms/src/base/Plugin.php(204): craft\web\View->namespaceInputs(Object(Closure), 'settings')
#10 /var/www/html/vendor/craftcms/cms/src/controllers/PluginsController.php(103): craft\base\Plugin->getSettingsResponse()
#11 [internal function]: craft\controllers\PluginsController->actionEditPluginSettings('remote-sync', Object(weareferal\remotesync\RemoteSync))
#12 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#13 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#14 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('edit-plugin-set...', Array)
#15 /var/www/html/vendor/craftcms/cms/src/web/Application.php(301): yii\base\Module->runAction('plugins/edit-pl...', Array)
#16 /var/www/html/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('plugins/edit-pl...', Array)
#17 /var/www/html/vendor/craftcms/cms/src/web/Application.php(286): yii\web\Application->handleRequest(Object(craft\web\Request))
#18 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#19 /var/www/html/web/index.php(16): yii\base\Application->run()
#20 {main}

I am running on craft 4.3.0 and can see the remote-core composer package installed.

timmyomahony commented 2 years ago

Hi @dwhoban could you try version 4.1.1

https://github.com/weareferal/craft-remote-sync/releases/tag/4.1.1

This should hopefully fix the issue

timmyomahony commented 1 year ago

I'm closing this issue as should hopefully be addressed. Let me know if encountered again and I can reopen.