Log message #4226192

# At Username Text
# Feb 11th 2020, 12:46 rochasmarcelo It probably good to set a custom default in the users plugin, maybe to '/' url, what do you think?
# Feb 11th 2020, 12:43 sebastian.krzewinski. Hi
# Feb 11th 2020, 12:41 challgren Its PSR thing, not Cake
# Feb 11th 2020, 12:41 lpj145 :,):,)
# Feb 11th 2020, 12:41 challgren Im not digging request->getAttribute but I understand why
# Feb 11th 2020, 12:37 challgren Ahh I got it working, forgot the prefix
# Feb 11th 2020, 12:30 slackebot 52525253D%25252525252525252525252525252525252Fsuper-admin%25252525252525252525252525252525252Fdashboard%25252525252525252525252525252525253Fredirect%25252525252525252525252525252525253D%2525252525252525252525252525252525252Fsuper-admin%2525252525252525252525252525252525252Ftenants`
# Feb 11th 2020, 12:30 slackebot 252525252525252Fsuper-admin%25252525252525252525252525252Fdashboard%25252525252525252525252525253Fredirect%25252525252525252525252525253D%2525252525252525252525252525252Fsuper-admin%2525252525252525252525252525252Fdashboard%2525252525252525252525252525253Fredirect%2525252525252525252525252525253D%252525252525252525252525252525252Fsuper-admin%252525252525252525252525252525252Fdashboard%252525252525252525252525252525253Fredirect%2525252525252525252525252
# Feb 11th 2020, 12:30 slackebot 3Fredirect%252525252525252525253D%25252525252525252525252Fsuper-admin%25252525252525252525252Fdashboard%25252525252525252525253Fredirect%25252525252525252525253D%2525252525252525252525252Fsuper-admin%2525252525252525252525252Fdashboard%2525252525252525252525253Fredirect%2525252525252525252525253D%252525252525252525252525252Fsuper-admin%252525252525252525252525252Fdashboard%252525252525252525252525253Fredirect%252525252525252525252525253D%25252525252525
# Feb 11th 2020, 12:30 challgren Yeah that didnt work
# Feb 11th 2020, 12:30 slackebot `https://bequest.truepedigree.com/super-admin/dashboard?redirect=%2Fsuper-admin%2Fdashboard%3Fredirect%3D%252Fsuper-admin%252Fdashboard%253Fredirect%253D%25252Fsuper-admin%25252Fdashboard%25253Fredirect%25253D%2525252Fsuper-admin%2525252Fdashboard%2525253Fredirect%2525253D%252525252Fsuper-admin%252525252Fdashboard%252525253Fredirect%252525253D%25252525252Fsuper-admin%25252525252Fdashboard%25252525253Fredirect%25252525253D%2525252525252Fsuper-admin%2525
# Feb 11th 2020, 12:30 slackebot 252525252Fdashboard%2525252525253Fredirect%2525252525253D%252525252525252Fsuper-admin%252525252525252Fdashboard%252525252525253Fredirect%252525252525253D%25252525252525252Fsuper-admin%25252525252525252Fdashboard%25252525252525253Fredirect%25252525252525253D%2525252525252525252Fsuper-admin%2525252525252525252Fdashboard%2525252525252525253Fredirect%2525252525252525253D%252525252525252525252Fsuper-admin%252525252525252525252Fdashboard%25252525252525252525
# Feb 11th 2020, 12:29 rochasmarcelo sorry it should be `'Auth.AuthorizationMiddleware.unauthorizedHandler.url' => [ 'controller' => 'MyControler', 'action' => 'myAction' ],` (edited)
# Feb 11th 2020, 12:28 rochasmarcelo missing a ' in the start
# Feb 11th 2020, 12:27 rochasmarcelo You could add this to your users.php 'Auth.AuthorizationMiddleware.unauthorizedHandler' => [ 'controller' => 'MyControler', 'action' => 'myAction', ],
# Feb 11th 2020, 12:26 rochasmarcelo It seems that by default authorization plugin redirect to users login
# Feb 11th 2020, 12:24 challgren Since user is already logged in it creates a never ending loop
# Feb 11th 2020, 12:23 challgren Access `/super-admin/tenants` Page redirects to `login?redirect%2Fsuper-admin%2Ftenants`
# Feb 11th 2020, 12:23 challgren Yeah it redirects to a page the user doesnt have permission to. So its a never ending loop
# Feb 11th 2020, 12:22 rochasmarcelo Have you checked user permission for the url it redirects to?
# Feb 11th 2020, 12:18 challgren Ok anyone have an idea why CakeDC/Users 9.x will redirect a rabc user to the login page, and then the login page just loops because the user is already logged in and the redirect url is outside the users permission
# Feb 11th 2020, 12:13 FunkadelicRelic @admad - I will do, thank you both!
# Feb 11th 2020, 12:12 FunkadelicRelic Amazing - thanks @challgren - that does indeed work.
# Feb 11th 2020, 12:12 admad FunkadelicRelic: the argument is typehinted as string hence the error. But perhaps it should be relaxed to accept nulls to, open an issue on GH
# Feb 11th 2020, 12:11 challgren `$this->Text->autoParagraph(h($modelname->fieldname ?? ''));` should work
# Feb 11th 2020, 12:09 FunkadelicRelic view.php renders perfectly if I've filled in each field and they aren't null. Isn't the autoParagraph function setup to handle getting null values?
# Feb 11th 2020, 12:08 FunkadelicRelic If the field is null, I get the error: Argument 1 passed to Cake\View\Helper\TextHelper::autoParagraph() must be of the type string, null given.
# Feb 11th 2020, 12:07 FunkadelicRelic Hey all - I'm running CakePHP 4.0.3 - Getting an error on this in my view.php: $this->Text->autoParagraph(h($modelname->fieldname));
# Feb 11th 2020, 11:48 challgren 347085
# Feb 11th 2020, 11:47 lpj145 skeleton help by expressive by the way.
# Feb 11th 2020, 11:47 lpj145 crud plugin is good for make api, but he have a lot magic methods.
# Feb 11th 2020, 11:46 lpj145 @damiano feel free to suggest.
# Feb 11th 2020, 11:20 challgren Ok will do, I bet they just need someone to give them info before publish time
# Feb 11th 2020, 11:19 megan @challgren will look into it and reach out to them! Thanks! Please pass any other suggestions on to me :)
# Feb 11th 2020, 11:19 challgren https://blog.jetbrains.com/phpstorm/2020/02/php-annotated-february-2020/
# Feb 11th 2020, 11:17 damiano @lpj145 i am seeing the project thanks
# Feb 11th 2020, 11:17 challgren Ok @megan I remember what it was about PHPStorm. The newsletter PHP Annotated they put out every month include nothing cake related at all. Seems like a missed opportunity
# Feb 11th 2020, 11:16 damiano the thing is that maybe a plugin/theme has its own logic so using the default controllers maybe is not the correct way
# Feb 11th 2020, 11:13 damiano another question, i usually create two plugins Frontend and Backend that have the themes...the question is should i create the routes and controlelr in the plugin or just the templates there and the controller in the default src/ ?
# Feb 11th 2020, 10:57 damiano ok, thank you @admad !
# Feb 11th 2020, 10:52 admad And btw environment variables as per their names belong in your environment, not files. The .env files should only be used locally to emulate env vars