# |
May 16th 2018, 12:43 |
Guest95046 |
I am using basic autnetication for it |
# |
May 16th 2018, 12:43 |
Diego_ |
use a token based auth |
# |
May 16th 2018, 12:42 |
Guest95046 |
I am getting an error while saving the data: { "code": 500, "name": "AclNode::node() - Couldn't find Aro node identified by "Array\n(\n [Aro0.model] => User\n [Aro0.foreign_key] => \n)\n"", "message": "AclNode::node() - Couldn't find Aro node identified by "Array\n(\n [Aro0.model] => User\n [Aro0.foreign_key] => \n)\n"", "url": "\/api\/risks.json" } |
# |
May 16th 2018, 12:42 |
Guest95046 |
I have created a separate controller for it but how do I authenticate |
# |
May 16th 2018, 12:42 |
Diego_ |
I think it's better create a separated api controller with a specific namespace / AppController |
# |
May 16th 2018, 12:37 |
Guest95046 |
Hi everyone. If I have $this->Auth->allow() in beforeFilter function of a controller, will it bypass authentication if I try to add data using api calls |
# |
May 16th 2018, 12:29 |
rudy1976s |
I have a warning: Notice (8): Undefined property: Acm3Core\View\Cell\PostsCell::$viewClass [CORE/src/View/Cell.php, line 307] . I have never had that before |
# |
May 16th 2018, 12:29 |
rudy1976s |
Good afternoon! |
# |
May 16th 2018, 11:32 |
nitishkumardiwakar |
I am trying to inner join two tables by following this reference https://book.cakephp.org/3.0/en/orm/associations.html getting Trying to get property 'name' of non-object |
# |
May 16th 2018, 11:10 |
unclezoot |
neon1024, are you around? |
# |
May 16th 2018, 10:39 |
unclezoot |
neon, when working with dates where do you store your timezone/locale for display within cake? we have the actual app as UTC within bootstrap.php, and I can see someone here has configured the TimeHelper within AppView to use Europe/London. Does it make sense to sniff it from there? if it helps, im just trying to remove the locale from this: $mydata->start->i18nFormat('dd/MM/yyyy HH:mm:ss', 'Europe/London') |
# |
May 16th 2018, 09:54 |
david |
now, I have a question... When using i18n behavior, I can access to the translations If I am browsing the main language site. But... could I access the main language if I am browsing a translated site version? |
# |
May 16th 2018, 09:46 |
saeideng |
https://github.com/cakephp/cakephp/releases/tag/3.6.3 |
# |
May 16th 2018, 09:46 |
saeideng |
`Fixed missing attribute emulation for ServerRequest::$here` |
# |
May 16th 2018, 09:45 |
saeideng |
yeah , a bit change was in 3.6.3 about `http` |
# |
May 16th 2018, 09:44 |
david |
thank you, guys |
# |
May 16th 2018, 09:44 |
david |
File uploaded https://cakesf.slack.com/files/UAPU3DV3J/FARHH470W/captura.png / https://slack-files.com/T053DPNCM-FARHH470W-4ef3741ad7 |
# |
May 16th 2018, 09:43 |
saeideng |
thanks to confirm the 3.6.3 |
# |
May 16th 2018, 09:42 |
david |
@saeideng that's it... |
# |
May 16th 2018, 09:42 |
david |
and it works |
# |
May 16th 2018, 09:42 |
david |
forget this... I have just updated via composer update to 3.6.3 |
# |
May 16th 2018, 09:42 |
saeideng |
cake 3.6.2 or 3.6.3? |
# |
May 16th 2018, 09:40 |
saeideng |
i mean was `debug($this->request->getUri()->getPath())` |
# |
May 16th 2018, 09:39 |
neon1024 |
@david Just had a thought. You might want to check your middleware, just in case the request is being modified somewhere |
# |
May 16th 2018, 09:39 |
david |
result is null |
# |
May 16th 2018, 09:39 |
david |
@saeideng if I use this in my controller: debug($this->request->getAttribute("here")); |
# |
May 16th 2018, 09:38 |
saeideng |
``` debug($this->getUri()->getPath()) debug($this->request->getAttribute("here")) ``` |
# |
May 16th 2018, 09:38 |
david |
I saw the deprecation in debugkit tab |
# |
May 16th 2018, 09:38 |
neon1024 |
I’m on 3.6.2 |
# |
May 16th 2018, 09:38 |
neon1024 |
I recently updated my project to use that code and it’s worked okay for me |
# |
May 16th 2018, 09:38 |
david |
thank you neon1024 |
# |
May 16th 2018, 09:38 |
neon1024 |
@david I’m not too sure then. I would check the Request tab in DebugKit to see what’s in the request |
# |
May 16th 2018, 09:37 |
neon1024 |
Whereas the template one hasn’t been deprecated yet |
# |
May 16th 2018, 09:37 |
neon1024 |
@saeideng Yeah, just checking as it could be a deprecated `->request` in a controller still |
# |
May 16th 2018, 09:37 |
saeideng |
@neon1024 unrelated to `$this->getRequest()` ;P |
# |
May 16th 2018, 09:36 |
david |
it's 3.6 |
# |
May 16th 2018, 09:36 |
neon1024 |
@david..and you’re running a 3.6.x build of CakePHP? |
# |
May 16th 2018, 09:35 |
saeideng |
use your relation type instead of `belongsToMany` |
# |
May 16th 2018, 09:35 |
neon1024 |
Or do this :point_up: |
# |
May 16th 2018, 09:35 |
saeideng |
``` $this->belongsToMany('Categories', [ 'foreignKey' => 'cat', .... ``` |
# |
May 16th 2018, 09:35 |
neon1024 |
@nitishkumardiwakar If you are going to update your database schema, it should be `category_id` have a look here -> https://book.cakephp.org/3.0/en/intro/conventions.html#database-conventions |