# |
Feb 24th 2020, 18:32 |
noel |
No.. I tried refactoring to `people` instead of `persons` and I get the same errors. |
# |
Feb 24th 2020, 18:31 |
dereuromark |
you might be able to set the alias manually though in the config of the relations, if you are lucky and you then bake the tests based on the existing model, it could work |
# |
Feb 24th 2020, 18:30 |
dereuromark |
Set the inflection for it to match person<=>persons, and see what happenes |
# |
Feb 24th 2020, 18:29 |
dereuromark |
I still think this should have been fixed in 4.x. You wouldnt expect this plural in technical terms usually. |
# |
Feb 24th 2020, 18:29 |
noel |
you think? |
# |
Feb 24th 2020, 18:29 |
dereuromark |
I bet it is because persons != people :) https://sandbox.dereuromark.de/sandbox/inflector?string=person |
# |
Feb 24th 2020, 18:29 |
noel |
Somehow permissions_roles test is looking for Enquiry entity, which is not related. |
# |
Feb 24th 2020, 18:28 |
noel |
And in fact causes the first m2m that was working to fail also. |
# |
Feb 24th 2020, 18:27 |
slackebot |
->addColumn('created', 'datetime') ->addColumn('modified', 'datetime') ->create(); $this->table('enquiries_persons') ->addColumn('enquiry_id', 'integer', ['signed' => false]) ->addColumn('person_id', 'integer', ['signed' => false]) ->create();``` |
# |
Feb 24th 2020, 18:27 |
noel |
But this doesn't work: ``` $this->table('persons') ->addColumn('name', 'string') ->addColumn('surname', 'string') ->addColumn('created', 'datetime') ->addColumn('modified', 'datetime') ->create(); $this->table('enquiries') ->addColumn('ref', 'string') ->addColumn('who', 'json') ->addColumn('date', 'datetime') ->addColumn('deleted', 'datetime', ['null' => true]) |
# |
Feb 24th 2020, 18:25 |
slackebot |
->addColumn('modified', 'datetime') ->create(); $this->table('permissions_roles') ->addColumn('permission_id', 'integer', ['signed' => false]) ->addColumn('role_id', 'integer', ['signed' => false]) ->create();``` |
# |
Feb 24th 2020, 18:25 |
noel |
E.g. This works fine: ```$this->table('roles') ->addColumn('name', 'string') ->addColumn('description', 'string', ['null' => true]) ->addColumn('created', 'datetime') ->addColumn('modified', 'datetime') ->create(); $this->table('permissions') ->addColumn('name', 'string') ->addColumn('description', 'string', ['null' => true]) ->addColumn('created', 'datetime') |
# |
Feb 24th 2020, 18:25 |
noel |
I also have other m2m's that are working fine. Can't see anything wrong with this one. |
# |
Feb 24th 2020, 18:24 |
noel |
It only fails to find them when baking the tests annotations, all other baked code is fine. |
# |
Feb 24th 2020, 18:21 |
noel |
Sure but I mean I can see that it can't find the association when trying to write bake tests but I have no idea why. |
# |
Feb 24th 2020, 18:19 |
dereuromark |
Did you check the line? What code is done there? And what the variable content looks like? |
# |
Feb 24th 2020, 18:17 |
noel |
Tried clearing the twig cache.. same deal |
# |
Feb 24th 2020, 18:17 |
noel |
3.8.x |
# |
Feb 24th 2020, 18:15 |
dereuromark |
could be some bad caching of twig template content though. |
# |
Feb 24th 2020, 18:14 |
dereuromark |
you should always mention the exact cake and plugin versions here. otherwise not really able to help |
# |
Feb 24th 2020, 18:13 |
slackebot |
Cake\Console\CommandRunner::run() - CORE/src/Console/CommandRunner.php, line 162 [main] - ROOT/bin/cake.php, line 12``` Any ideas what's wrong? |
# |
Feb 24th 2020, 18:13 |
slackebot |
Bake\Shell\BakeShell::Bake\Shell\{closure}() - ROOT/vendor/cakephp/bake/src/Shell/BakeShell.php, line 279 Cake\Collection\Collection::each() - CORE/src/Collection/CollectionTrait.php, line 64 Bake\Shell\BakeShell::all() - ROOT/vendor/cakephp/bake/src/Shell/BakeShell.php, line 280 Cake\Console\Shell::runCommand() - CORE/src/Console/Shell.php, line 517 Cake\Console\CommandRunner::runShell() - CORE/src/Console/CommandRunner.php, line 385 |
# |
Feb 24th 2020, 18:13 |
slackebot |
ROOT/vendor/cakephp/bake/src/Shell/Task/BakeTemplateTask.php, line 91 QuasarAdmin\Shell\Task\ModelTask::bakeTableExtension() - ROOT/plugins/QuasarAdmin/src/Shell/Task/ModelTask.php, line 155 QuasarAdmin\Shell\Task\ModelTask::bake() - ROOT/plugins/QuasarAdmin/src/Shell/Task/ModelTask.php, line 38 Bake\Shell\Task\ModelTask::main() - ROOT/vendor/cakephp/bake/src/Shell/Task/ModelTask.php, line 101 |
# |
Feb 24th 2020, 18:13 |
slackebot |
455 Twig\Template::display() - ROOT/vendor/twig/twig/src/Template.php, line 422 Twig\Template::render() - ROOT/vendor/twig/twig/src/Template.php, line 434 WyriHaximus\TwigView\View\TwigView::_render() - ROOT/vendor/wyrihaximus/twig-view/src/View/TwigView.php, line 180 Bake\View\BakeView::render() - ROOT/vendor/cakephp/bake/src/View/BakeView.php, line 146 Bake\Shell\Task\BakeTemplateTask::generate() - |
# |
Feb 24th 2020, 18:13 |
slackebot |
ROOT/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php, line 250 Twig\Template::getAttribute() - ROOT/vendor/twig/twig/src/Template.php, line 704 __TwigTemplate_f7bf778fd7b532a52105fa791346104191d92de1546cf9d454cd16fe3d54519b::doDisplay() - ROOT/tmp/cache/twigView/bd/bd0f7fe6fbda10de43c4a5f7432128f12025b660c9d629bbd8074ac352a16995.php, line 33 Twig\Template::displayWithErrorHandling() - ROOT/vendor/twig/twig/src/Template.php, line |
# |
Feb 24th 2020, 18:13 |
noel |
I'm trying to create a m2m association and I'm getting a weird bake error: ```2020-02-24 18:10:14 Notice: Notice (8): Undefined index: Enquiries in [/Users/myproject/vendor/cakephp/bake/src/View/Helper/DocBlockHelper.php, line 250] Trace: Cake\Error\BaseErrorHandler::handleError() - CORE/src/Error/BaseErrorHandler.php, line 158 Bake\View\Helper\DocBlockHelper::buildTableAnnotations() - |
# |
Feb 24th 2020, 18:06 |
dereuromark |
nope, middleware is actually invoked: https://github.com/cakephp/cakephp/issues/14321 Must be sth else. At least debugging it I found the actual error causing the 500, a test harness bug in core probably. |
# |
Feb 24th 2020, 17:49 |
dereuromark |
It still switches back to normal Exception renderer, debugging the constructor reveals "#message: "Cannot describe countries. It has 0 columns."" etc, some low level issue. Could this be happening before the middleware is activated even? |
# |
Feb 24th 2020, 17:49 |
dereuromark |
Not in master (4.x yet it seems) |
# |
Feb 24th 2020, 17:47 |
ndm |
wasn't there a fix for that recently? |
# |
Feb 24th 2020, 17:45 |
dereuromark |
Did anyone figure out yet why `$this->disableErrorHandlerMiddleware();` doesnt work in cakephp 4 tests? |
# |
Feb 24th 2020, 17:42 |
alexdd55976 |
Can not confirm or deny this :grimacing: |
# |
Feb 24th 2020, 17:19 |
ndm |
Isn't that what admins do anyways, wasting time on stupid tasks? :) |
# |
Feb 24th 2020, 17:15 |
alexdd55976 |
Our admin wasted hours |
# |
Feb 24th 2020, 17:15 |
alexdd55976 |
Thanks @ndm |
# |
Feb 24th 2020, 17:15 |
alexdd55976 |
Windows crap |
# |
Feb 24th 2020, 17:00 |
ndm |
Classnames translate to filenames, so if you have a case sensitive filesystem, `LDAPIdentifier.php` doesn't exist. |
# |
Feb 24th 2020, 16:56 |
alexdd55976 |
dude... wtf... |
# |
Feb 24th 2020, 16:43 |
ndm |
The class name is `Ldap...` |
# |
Feb 24th 2020, 16:43 |
alexdd55976 |
this is what the error.log is giving me.... no idea |
# |
Feb 24th 2020, 16:42 |
slackebot |
/www/ibaonnect/app/src/Application.php:75 - /www/ibaonnect/app/vendor/cakephp/cakephp/src/Http/Server.php:83 - /www/ibaonnect/app/webroot/index.php:40``` |