# |
Dec 4th 2019, 11:22 |
ndm |
Returning a response object from a controller will circumvent the rendering process. You probably just want to reassign the response property. |
# |
Dec 4th 2019, 11:19 |
slackebot2 |
$this->response->withStatus(400);``` |
# |
Dec 4th 2019, 11:19 |
info315 |
I still have issues while i try to set a HTTP status code with cake4 rc2 and respons json output. I try it like this and my status code is 400, but i don't get any response data at all: ``` $CommandsTable->save($command); if ($command->hasErrors()) { $this->set('error', $command->getErrors()); $this->viewBuilder()->setOption('serialize', ['error']); return |
# |
Dec 4th 2019, 10:48 |
latenal |
Thanks! |
# |
Dec 4th 2019, 10:28 |
admad |
https://book.cakephp.org/3/en/core-libraries/form.html |
# |
Dec 4th 2019, 10:28 |
admad |
@latenal use the Form class and set validations for it |
# |
Dec 4th 2019, 10:27 |
admad |
You don't need an external lib for something that already exists in core |
# |
Dec 4th 2019, 10:25 |
admad |
https://github.com/cakephp/validation |
# |
Dec 4th 2019, 10:24 |
slackebot2 |
!awesome |
# |
Dec 4th 2019, 10:24 |
slackebot2 |
Command sent from Slack by challgren: |
# |
Dec 4th 2019, 10:24 |
slackebot2 |
! awesome |
# |
Dec 4th 2019, 10:24 |
slackebot2 |
Command sent from Slack by challgren: |
# |
Dec 4th 2019, 10:16 |
latenal |
Hi! Is there a plugin for upload validation without saving it to the database? |
# |
Dec 4th 2019, 10:07 |
javier.villanueva |
sure |
# |
Dec 4th 2019, 10:07 |
challgren |
The 2 cat bullied the dog |
# |
Dec 4th 2019, 10:07 |
javier.villanueva |
haha |
# |
Dec 4th 2019, 10:07 |
challgren |
2 cats vs 1 dog different story! |
# |
Dec 4th 2019, 10:07 |
javier.villanueva |
don't forget to always have food on the plate |
# |
Dec 4th 2019, 10:06 |
challgren |
The dog learned cat habits and the cat learned dog habits! |
# |
Dec 4th 2019, 10:06 |
javier.villanueva |
always there are exceptions xD |
# |
Dec 4th 2019, 10:06 |
challgren |
@javier.villanueva nah! My cat and dog got along well! |
# |
Dec 4th 2019, 10:06 |
javier.villanueva |
another tip, you should never mix dogs and cats |
# |
Dec 4th 2019, 10:01 |
neon1024 |
My guess is yesterday you were on convention, and has DogsCatsTable and DogsCatsController. I would guess that something has changed with the naming or aliases |
# |
Dec 4th 2019, 10:00 |
gianmarxgagliardi |
@spriz it works thanks. I don't understand why yesterday everything went without this line and today it is not |
# |
Dec 4th 2019, 09:57 |
spriz |
`var_dump($this->DogsCats)` should give `\App\Model\Table\DogsCatsTable` - or at the very least something like `\Cake\Orm\Table` |
# |
Dec 4th 2019, 09:56 |
spriz |
@gianmarxgagliardi have you added `$this->loadModel(' |
# |
Dec 4th 2019, 09:54 |
gianmarxgagliardi |
I do not understand |
# |
Dec 4th 2019, 09:53 |
gianmarxgagliardi |
you can be more specific |
# |
Dec 4th 2019, 09:49 |
neon1024 |
This is exactly your error, your table class is not loaded, again. Third time! |
# |
Dec 4th 2019, 09:49 |
neon1024 |
This :point_up: |
# |
Dec 4th 2019, 09:49 |
gianmarxgagliardi |
if I do a `var_dump` of `$this->DogsCats` gives the following result: `C:\wamp64\www\cake\src\Controller\DogsCatsController.php:21:boolean false` |
# |
Dec 4th 2019, 09:44 |
gianmarxgagliardi |
I repeated yesterday evening I had no idea what could have happened I had also put the solution on stack over flow --> https://stackoverflow.com/questions/59141547/cakephp-displays-the-id-display-table-name-from-two-different-tables-with-relati |
# |
Dec 4th 2019, 09:39 |
gianmarxgagliardi |
yes -> https://pastebin.com/j4ARkz3s |
# |
Dec 4th 2019, 09:37 |
jotpe |
@gianmarxgagliardi does your DogsCatsTable exist? |
# |
Dec 4th 2019, 09:35 |
jotpe |
Morning |
# |
Dec 4th 2019, 09:33 |
gianmarxgagliardi |
sorry I don't know if it ever happened to any of you, everything worked for me last night. Tell me this screen |
# |
Dec 4th 2019, 08:29 |
steinkel |
@nuzulfikrie we opted to provide support for new auth plugins + 4.x and keep AuthComponent for 3.x |
# |
Dec 4th 2019, 07:00 |
javier.villanueva |
morning all |
# |
Dec 4th 2019, 05:10 |
challgren |
@nuzulfikrie is there a branch support for 3.8 and authentication? |
# |
Dec 4th 2019, 04:20 |
challgren |
Yeah I think everyone is going 4.x |
# |
Dec 4th 2019, 04:02 |
nuzulfikrie |
Thanks @challgren. Closer look on Github, seems that the Doc is for 4.x, But code i got is 3.x |