Log message #4184644

# At Username Text
# Apr 25th 2019, 15:56 neon1024 Perhaps your app Console class is out of date?
# Apr 25th 2019, 15:56 neon1024 Yeas, good point :point_up:
# Apr 25th 2019, 15:55 ricksaccous @this.impetus https://github.com/cakephp/app
# Apr 25th 2019, 15:55 neon1024 If this `MeTools` is in it’s own namespace, it should exist in both your `composer.json` and in your `vendors` folder
# Apr 25th 2019, 15:54 this.impetus @ricksaccous I dunno what that means brother, sorry
# Apr 25th 2019, 15:54 this.impetus @neon1024 Yeah I tried precisely that (fixing the namespace) on my own, no dice; will contact the author and let him sort it out
# Apr 25th 2019, 15:54 neon1024 ..and if it’s missing, would explain why it’s `null`
# Apr 25th 2019, 15:53 neon1024 Which would be a good bet for where the error is
# Apr 25th 2019, 15:53 neon1024 Or they’ve extended the class
# Apr 25th 2019, 15:53 neon1024 Usually that is caused by PHP looking for a class in the current namespace, because the code has incorrectly used the namespace. They probably meant `\Cake\Console\Command`
# Apr 25th 2019, 15:53 ricksaccous @this.impetus is your application skeleton up to date?
# Apr 25th 2019, 15:52 this.impetus (this is post-nuke, which was worth trying because I have very little vendor content not initially supplied by cake anyway)
# Apr 25th 2019, 15:51 this.impetus Absolute final question on this issue, just a shot in the dark; the problem-plugin, when I attempt to use bake, throws `Fatal error: Class 'MeTools\Console\Command' not found`; I wouldn't imagine anyone but the author of the plugin to solve this, just curious if you know what `MeTools` is or whether that error is familiar from other contexts
# Apr 25th 2019, 15:48 this.impetus Ah! thank you, I know where the problem is now. not how to solve it, but I know where it is; it's a third-party plug-in. Yeah I already changed the deprecated methods to the current ones, but something in one of my plugins was causing a ruckous earlier, I just commented out a few lines that I imagined had solved it, I see now the poison runs deeper.
# Apr 25th 2019, 15:47 neon1024 `rm -rf vendor andand composer clearcache andand composer install`
# Apr 25th 2019, 15:47 neon1024 Alternative is to “Nuke the site from orbit”
# Apr 25th 2019, 15:47 neon1024 Between `Plugin::load()` in `bootstrap.php` and `$this->addPlugin()` in `Application.php`
# Apr 25th 2019, 15:47 neon1024 ..and check how you’re loading them as in Cake 3.6 *I think* there was a new way to load plugins introduced
# Apr 25th 2019, 15:46 neon1024 Probably worth checking the plugins to check they support your version of cakephp
# Apr 25th 2019, 15:46 neon1024 So there is one which is doing it incorrectly
# Apr 25th 2019, 15:46 neon1024 Well it looks to me like plugins are adding commands for bin/cake
# Apr 25th 2019, 15:45 this.impetus which makes me think bin/cake, rather than the call to bake all, is where the problem starts.
# Apr 25th 2019, 15:44 this.impetus ooook... that actually results in the same `Exception: Call to a member function addMany() on null` error
# Apr 25th 2019, 15:43 neon1024 Also worth a `bin/cake cache clear_all` to ensure it’s not a cached error
# Apr 25th 2019, 15:43 this.impetus nah it's comforting to know that I'm rightfully stumped ;P
# Apr 25th 2019, 15:42 neon1024 Yeah, and without seeing the code it’s hard to give any insight, sorry
# Apr 25th 2019, 15:42 this.impetus so it's difficult to assess why it's returning null, or what it ought to have returned
# Apr 25th 2019, 15:41 this.impetus I duno what `$this->app->pluginConsole()` does, or which bit of `$commands` it was intended to use
# Apr 25th 2019, 15:41 this.impetus But *after* 142, `$commands` is null
# Apr 25th 2019, 15:40 slackebot 'Cake\Shell\OrmCacheShell', 'plugin' => 'Cake\Shell\PluginShell', 'routes' => 'Cake\Shell\RoutesShell', 'schema_cache' => 'Cake\Shell\SchemaCacheShell', 'server' => 'Cake\Shell\ServerShell', 'console' => 'App\Shell\ConsoleShell' ] } ```
# Apr 25th 2019, 15:40 this.impetus at line 142 in `vendor/cakephp/src/Console/CommandRunner.php` I ran `debug()` on `$commands`; prints ```########## DEBUG ########## object(Cake\Console\CommandCollection) { [protected] commands => [ 'version' => 'Cake\Command\VersionCommand', 'help' => 'Cake\Command\HelpCommand', 'cache' => 'Cake\Shell\CacheShell', 'completion' => 'Cake\Shell\CompletionShell', 'i18n' => 'Cake\Shell\I18nShell', 'orm_cache' =>
# Apr 25th 2019, 15:39 this.impetus Well I can see where the dilemma arises, but i know far too little about cake's machinery to make sense of it. Here's where I'm at:
# Apr 25th 2019, 15:34 this.impetus ok I'll go down that rabbit hole, ty
# Apr 25th 2019, 15:34 neon1024 That should have a stacktrade to tell you where stuff went wrong
# Apr 25th 2019, 15:33 neon1024 If it’s a command line it should be in `/logs/cli-error.log`
# Apr 25th 2019, 15:33 neon1024 Did you check the logs?
# Apr 25th 2019, 15:33 neon1024 So maybe here, https://github.com/cakephp/cakephp/blob/c15a2e9c1933fa5a874c33d2bcb6d63efacf8876/src/Http/BaseApplication.php#L206
# Apr 25th 2019, 15:33 this.impetus It will sadden us both that i don't really understand that last sentence, alas.
# Apr 25th 2019, 15:32 neon1024 So perhaps it’s a plugin with a Shell class
# Apr 25th 2019, 15:32 this.impetus But I am pretty damn sure everything is right in the database. The table certainly exists, and the tables it references were extant in the project before I added the HABTM table. just `images`, `publications` and `images_publications`
# Apr 25th 2019, 15:32 neon1024 https://github.com/cakephp/cakephp/blob/e6c40f7814039e68abe2c11721d0cda4b6c4cb54/src/Console/CommandCollection.php#L85