Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Class name must be a valid object or a string ] while installing a local plugin in craft cms #7621

Closed
AmandeepSingh2048 opened this issue Feb 25, 2021 · 5 comments
Labels

Comments

@AmandeepSingh2048
Copy link

AmandeepSingh2048 commented Feb 25, 2021

Description

Error: Class name must be a valid object or a string in C:\xampp\htdocs\craft\vendor\craftcms\cms\src\services\Plugins.php:494
Stack trace:
#0 C:\xampp\htdocs\craft\vendor\craftcms\cms\src\controllers\PluginsController.php(49): craft\services\Plugins->installPlugin('temp-p', NULL)
#1 [internal function]: craft\controllers\PluginsController->actionInstallPlugin()
#2 C:\xampp\htdocs\craft\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array)
#3 C:\xampp\htdocs\craft\vendor\yiisoft\yii2\base\Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#4 C:\xampp\htdocs\craft\vendor\craftcms\cms\src\web\Controller.php(190): yii\base\Controller->runAction('install-plugin', Array)
#5 C:\xampp\htdocs\craft\vendor\yiisoft\yii2\base\Module.php(534): craft\web\Controller->runAction('install-plugin', Array)
#6 C:\xampp\htdocs\craft\vendor\craftcms\cms\src\web\Application.php(274): yii\base\Module->runAction('plugins/install...', Array)
#7 C:\xampp\htdocs\craft\vendor\craftcms\cms\src\web\Application.php(577): craft\web\Application->runAction('plugins/install...', Array)
#8 C:\xampp\htdocs\craft\vendor\craftcms\cms\src\web\Application.php(253): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#9 C:\xampp\htdocs\craft\vendor\yiisoft\yii2\base\Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request))
#10 C:\xampp\htdocs\craft\index.php(22): yii\base\Application->run()
#11 {main}

I created a plugin with pluginfactory.io
My plugin is visible in craft cms plugin plage but when i am trying to install the plugin i am getting this error
Any help would be appreciated

Additional info

PHP version 7.4.13
WINNT 10.0
MySQL 5.5.5
GD 7.4.13
Craft Solo 3.6.7
2.0.40
v2.14.3
7.2.0
@brandonkelly
Copy link
Member

Looks like the only way that could happen is if your plugin class doesn’t extend craft\base\Plugin. Make sure that’s the case.

If you need additional help, please send your plugin source files over to [email protected].

@AmandeepSingh2048
Copy link
Author

I tried this and few other solutions but nothing seems to work. I have sent the source code to [email protected]
Thankyou

@AntoineMaillard06
Copy link

I have the same issue here, @AmandeepSingh2048 were you able to fix it ?

@malikhamari
Copy link

Facing same issue, if find any lead, please put it in this thread, thanks

@brianjhanson
Copy link
Contributor

This is usually some kind of misconfiguration issue. If you're running into it, make sure you've followed all the steps for loading your local plugin in the documentation and are extending the base plugin class as Brandon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants