getherbert / herbert

The WordPress Plugin Framework:
http://getherbert.com/
632 stars 94 forks source link

2 herbert plugins activated throws error #102

Open imboden opened 8 years ago

imboden commented 8 years ago

Hello,

When I activate a 2nd plugin done with Herbert Framework, it look like the 2nd one is using the ConnectionFactory.php from the first one.

When I activate the 2nd plugin I got this message:

Fatal error: Uncaught TypeError: Argument 1 passed to Illuminate\Database\Connection::__construct() must be an instance of PDO, instance of Closure given, called in PATH_FROM_THE _FIRST_PLUGIN/vendor/illuminate/database/Connectors/ConnectionFactory.php on line 220 and defined in PATH_FROM_THE _2ND_PLUGIN/vendor/illuminate/database/Connection.php on line 142

Any idea?

mizan3008 commented 8 years ago

Hello,

I'm trying to get the post Post::find($id)

but getting this-

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'utf8mb4'' in D:\xampp\htdocs\sws-mizanurrahman\herbert-plugin\vendor\illuminate\database\Connectors\MySqlConnector.php:40 Stack trace: #0 D:\xampp\htdocs\sws-mizanurrahman\herbert-plugin\vendor\illuminate\database\Connectors\MySqlConnector.php(40): PDO->prepare('set names 'utf8...') #1 D:\xampp\htdocs\sws-mizanurrahman\herbert-plugin\vendor\illuminate\database\Connectors\ConnectionFactory.php(61): Illuminate\Database\Connectors\MySqlConnector->connect(Array) #2 [internal function]: Illuminate\Database\Connectors\ConnectionFactory->Illuminate\Database\Connectors\{closure}() #3 D:\xampp\htdocs\sws-mizanurrahman\herbert-plugin\vendor\illuminate\database\Connection.php(933): call_user_func(Object(Closure)) #4 D:\xampp\htdocs\sws-mizanurrahman\herbert-plugin\vendor\illuminate\database\Connection.php(801): Illuminate\Database\Connection->getPdo() #5 D:\x in D:\xampp\htdocs\sws-mizanurrahman\herbert-plugin\vendor\illuminate\database\Connectors\MySqlConnector.php on line 40

Using HerBert freamwork

What should I do?

arippberger commented 8 years ago

@mizanur-rahman your error seems unrelated to this issue. Please see https://github.com/getherbert/framework/issues/9 for a solution. In the future, please open up a separate issue specific to your problem.