Log message #4217277

# At Username Text
# Dec 4th 2019, 12:17 val Hi, is there a function in 3.x that gets the class name of an object stripping a namespace?
# Dec 4th 2019, 11:28 info315 Thanks @ndm, this seems to work: ``` $this->set('error', $command->getErrors()); $this->viewBuilder()->setOption('serialize', ['error']); $this->response = $this->response->withStatus(400); return;```
# Dec 4th 2019, 11:27 ndm And as mentioned the status can then be set by reassigning the response, like `$this->response = $this->response->withStatus(400);`
# Dec 4th 2019, 11:25 ndm Do you really want to stop the controller, or just your controller action logic? In the latter case you can return `null`, this will halt your action logic, but the controller logic will continue and render your view.
# Dec 4th 2019, 11:23 info315 this was the only way i found, to get something else than 200 Ok
# Dec 4th 2019, 11:22 info315 but i don't know how to change the statuscode
# Dec 4th 2019, 11:22 info315 I just want to set the statuscode to 400 and stop controller execution
# 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?