# |
Apr 24th 2019, 19:51 |
mrgrimpy |
Yes a 500 |
# |
Apr 24th 2019, 19:51 |
mrgrimpy |
I tried earlier |
# |
Apr 24th 2019, 19:51 |
jeremyharris |
probably a 500? |
# |
Apr 24th 2019, 19:51 |
jeremyharris |
ok what do you get with debug off? |
# |
Apr 24th 2019, 19:51 |
mrgrimpy |
I would rather the application throw a 404 |
# |
Apr 24th 2019, 19:51 |
mrgrimpy |
With debug on I get Cake\View\Exception\MissingTemplateException |
# |
Apr 24th 2019, 19:51 |
mrgrimpy |
Hi, yes I unfortunately still haven't found a solution |
# |
Apr 24th 2019, 19:50 |
jeremyharris |
usually you should see the json version of the missing template exception (if debug) or the 404/500 (can’t remember) if debug is off |
# |
Apr 24th 2019, 19:50 |
jeremyharris |
@mrgrimpy if you’re still working on your issue, have you deleted the template for the normal view? |
# |
Apr 24th 2019, 19:39 |
mrgrimpy |
Hi this is Coddyx, just switched platform. |
# |
Apr 24th 2019, 17:50 |
Coddyx |
Anyone? |
# |
Apr 24th 2019, 17:38 |
Coddyx |
Here is my route (within '/' scope') $routes->connect('/niveaux2', ['controller' => 'Ressources', 'action' => 'niveaux2'], ['_name' => 'niveaux2', '_ext' => ['json'], 'routeClass' => 'ADmad/I18n.I18nRoute']); |
# |
Apr 24th 2019, 17:37 |
Coddyx |
Hi, I am working on a simple controller that spits out JSON and I was wondering how to set up routes to output JSON only? I tried many things but the application always try to respond to the URL without ".json" at the end instead of throwing a 404. |
# |
Apr 24th 2019, 17:21 |
asdfgh |
so do i must start from a smallint |
# |
Apr 24th 2019, 17:21 |
asdfgh |
ok i got it, it is used for bool too |
# |
Apr 24th 2019, 17:21 |
asdfgh |
i read that i can use number until 255 in a tinyint field, is wrong? |
# |
Apr 24th 2019, 17:20 |
admad |
*MySQL not myself :) |
# |
Apr 24th 2019, 17:20 |
admad |
Because tinyint(1) is used to emulate boolean in myself since it doesn't have actual boolean type |
# |
Apr 24th 2019, 17:20 |
dereuromark |
oh geeze |
# |
Apr 24th 2019, 17:18 |
asdfgh |
why should i use INT or something bigger thatn tinyint if the table is so small ? |
# |
Apr 24th 2019, 17:18 |
dereuromark |
even for 1 entry only |
# |
Apr 24th 2019, 17:18 |
dereuromark |
doesnt matter |
# |
Apr 24th 2019, 17:18 |
asdfgh |
i will never change it |
# |
Apr 24th 2019, 17:18 |
asdfgh |
it has 100 records |
# |
Apr 24th 2019, 17:18 |
asdfgh |
dereuromark it is a fixed table |
# |
Apr 24th 2019, 17:13 |
dereuromark |
first rule: dont nano opt. prematurely |
# |
Apr 24th 2019, 17:09 |
asdfgh |
why is it wrong ? |
# |
Apr 24th 2019, 17:09 |
asdfgh |
it is a very small table |
# |
Apr 24th 2019, 17:09 |
asdfgh |
neon1024 ? why ? |
# |
Apr 24th 2019, 16:56 |
neon1024 |
I would then suggest that your database schema is setup incorrectly. Especially if your `id` column is `tinyint` :O |
# |
Apr 24th 2019, 16:55 |
neon1024 |
@asdfgh If you’re generating a snapshot, then it’s reading from your database, not generating one |
# |
Apr 24th 2019, 16:15 |
asdfgh |
neon1024 i tried with migrations 2.1.1 (the last version) but i alwyas see ->addColumn('id', 'tinyinteger' <--- |
# |
Apr 24th 2019, 16:07 |
yamcomnet |
im trying to disable Csrf. |
# |
Apr 24th 2019, 16:07 |
yamcomnet |
public function beforeFilter(Event $event) { parent::beforeFilter($event); $test = $this->eventManager()->off($this->Csrf); #debug($test); $this->Security->setConfig('unlockedActions', ['getPortsByCountry','newEntryStep1']); if (in_array($this->request->action, ['getPortsByCountry','newEntryStep1'])) { } } |
# |
Apr 24th 2019, 16:07 |
yamcomnet |
I have activated Security component and CSRF middleware. Seems to be working. Now i have problem for disabling it for some actions. I do controller beforeFilter like this. No Joy :( |
# |
Apr 24th 2019, 16:06 |
asdfgh |
when i have installed it |
# |
Apr 24th 2019, 16:06 |
asdfgh |
it comes with cakephp/app |
# |
Apr 24th 2019, 16:05 |
asdfgh |
old ? |
# |
Apr 24th 2019, 16:05 |
asdfgh |
"cakephp/migrations": "^2.0.0", |
# |
Apr 24th 2019, 16:05 |
asdfgh |
neon1024 no |
# |
Apr 24th 2019, 16:04 |
neon1024 |
Hometime! :wave: |