# |
Dec 9th 2019, 15:23 |
gianmarxgagliardi |
I'm developing with version 3.8 |
# |
Dec 9th 2019, 15:22 |
jotpe |
@gianmarxgagliardi for a new App I would start with AuthencationPlugin, since Cake4x will not wait for too long. |
# |
Dec 9th 2019, 15:21 |
gianmarxgagliardi |
@jotpe should I redo everything from scratch? |
# |
Dec 9th 2019, 15:18 |
jotpe |
https://book.cakephp.org/3/en/controllers/components/authentication.html |
# |
Dec 9th 2019, 15:17 |
jotpe |
@gianmarxgagliardi better try to get Authentication working with the Authentication Plugin, since AuthComponent is deprecated: https://book.cakephp.org/authentication/1/en/index.html |
# |
Dec 9th 2019, 15:15 |
jotpe |
did you also do `bin/cake plugin assets symlink` |
# |
Dec 9th 2019, 15:14 |
koeller |
@jotpe: Yep, tried both :( |
# |
Dec 9th 2019, 15:13 |
slackebot2 |
$this->redirect($this->Auth->redirectUrl()); } $this->Flash->error('Your username or password is incorrect.'); } }``` always prints to me: _Your username or password is incorrect._ can someone help me |
# |
Dec 9th 2019, 15:13 |
gianmarxgagliardi |
I'm following this guide -> https://book.cakephp.org/3/en/tutorials-and-examples/cms/authentication.html; after I entered email and password in the users table it gives me problems on login. ```// In src/Controller/UsersController.php public function login() { if ($this->request->is('post')) { $user = $this->Auth->identify(); if ($user) { $this->Auth->setUser($user); return |
# |
Dec 9th 2019, 15:13 |
jotpe |
@koeller you tried `bin/cake cache clear`_all and `bin/cake orm_cache clear`? |
# |
Dec 9th 2019, 14:58 |
slackebot2 |
other projects are working just fine. |
# |
Dec 9th 2019, 14:58 |
koeller |
Hi everybody, I’m having an issue with DebugKit. My app recieves a 403 when trying to load toolbar.js. When I enter the url into my browser I also recieve a 403 error. I tried a fresh install of cake and there it works fine. When copying the composer.json of the fresh install into my project, removing composer.lock and vendor and doing a composer install afterwards, I still get a 403 … Does anyone have an idea, what that might be? All my |
# |
Dec 9th 2019, 14:32 |
japerlman |
It's hard to know what examples I'm finding are for 3.x or 2.x too |
# |
Dec 9th 2019, 14:28 |
japerlman |
is what I have in my find->('all', |
# |
Dec 9th 2019, 14:28 |
japerlman |
```'fields' => ('SUM(ClientLogs.hours) AS hours')``` |
# |
Dec 9th 2019, 14:28 |
japerlman |
I'm really struggling with the different from 2.x when creating queries, can anyone help me SUM a field in the query? Everything I'm finding is saying to just run the query without the sum, then do the sum after it's returned, I don't understand why that's better. |
# |
Dec 9th 2019, 13:43 |
jotpe |
any suggestions? |
# |
Dec 9th 2019, 13:43 |
jotpe |
If I set debugging in app.php it's working |
# |
Dec 9th 2019, 13:43 |
jotpe |
The error only appears when change debug to true in my .env file |
# |
Dec 9th 2019, 13:42 |
jotpe |
`Error: Nesting level too deep - recursive dependency?` `File /usr/www/users/xxx/xxx-dev/vendor/cakephp/cakephp/src/Error/Debugger.php` `Line: 575` |
# |
Dec 9th 2019, 13:42 |
gianmarxgagliardi |
`bin/cake.bat bake all xxx` <-with this it works |
# |
Dec 9th 2019, 13:42 |
jotpe |
I've got this error again. It disappears when I change my debug mode to false: |
# |
Dec 9th 2019, 13:41 |
gianmarxgagliardi |
@steinkel ok it works thanks |
# |
Dec 9th 2019, 13:40 |
steinkel |
no, run it from the parent folder is OK |
# |
Dec 9th 2019, 13:40 |
gianmarxgagliardi |
do I have to enter the bin folder? |
# |
Dec 9th 2019, 13:39 |
steinkel |
@gianmarxgagliardi in windows, try using `bin/cake.bat bake all xxx` or `path_to_php.exe bin/cake.php bake xxx` |
# |
Dec 9th 2019, 13:37 |
gianmarxgagliardi |
@conehead when I go to the project on wamp and try to start cooking the user table with the `cake bake all user` command _"cake" is not recognized as an internal or external command, a executable program a batch file. cake php_ |
# |
Dec 9th 2019, 13:33 |
conehead |
`bin/cake bake all users` ? |
# |
Dec 9th 2019, 13:28 |
gianmarxgagliardi |
when i do `cake bake all users` _"cake" is not recognized as an internal or external command, a executable program a batch file. cake php_ you know how i can solve |
# |
Dec 9th 2019, 13:14 |
javier.villanueva |
works perfect! |
# |
Dec 9th 2019, 13:12 |
javier.villanueva |
ok thanks admad |
# |
Dec 9th 2019, 12:47 |
admad |
set $modelClass property to 'Users` in the extended controller |
# |
Dec 9th 2019, 12:28 |
javier.villanueva |
what is the best way to extend a controller from other.... I mean for instance if I have "Users" and "PowerUsers" . I have PowerUsers extends Users. But in my functions I have $this->Users... then crash. Is a good way use this extentends or there are another best way? Thanks |
# |
Dec 9th 2019, 12:22 |
ndm |
If the foreign key column is nullable, then it means both of those things... I'm not sure that the `dependent` part is true though, I'd thought it would be the opposite, |
# |
Dec 9th 2019, 12:17 |
val |
Or does it mean "the foreign key will be set to null"? |
# |
Dec 9th 2019, 12:15 |
val |
Does it mean "will not be removed"? |
# |
Dec 9th 2019, 12:14 |
val |
what does it mean "will be orphaned"? https://book.cakephp.org/3/en/orm/associations.html#hasmany-associations |
# |
Dec 9th 2019, 12:14 |
val |
> If the foreign key is a nullable column or if dependent is true records will be orphaned. |
# |
Dec 9th 2019, 11:41 |
challgren |
3 is way too many errors |
# |
Dec 9th 2019, 11:41 |
challgren |
What level for a 3.8 app? |
# |
Dec 9th 2019, 11:38 |
alexdd55976 |
morning, troopers |