# |
Sep 5th 2019, 19:59 |
admad |
i wouldn't put anything related to ssh tunneling in php :slightly_smiling_face: |
# |
Sep 5th 2019, 19:58 |
ricksaccous |
lol okay, but if you were faced with that issue, what would you do? |
# |
Sep 5th 2019, 19:58 |
admad |
you can do whatever you want in your custom connection class :slightly_smiling_face: |
# |
Sep 5th 2019, 19:54 |
ricksaccous |
or whatever class ultimately makes the connection |
# |
Sep 5th 2019, 19:53 |
ricksaccous |
when you connect |
# |
Sep 5th 2019, 19:53 |
ricksaccous |
but it might be nice to check if tunnel was there, and if not create it |
# |
Sep 5th 2019, 19:53 |
ricksaccous |
that's what i've done before |
# |
Sep 5th 2019, 19:52 |
admad |
why would there be? create the tunnel and specify port in cake db config |
# |
Sep 5th 2019, 19:52 |
challgren |
You’d probably have to create the tunnel first |
# |
Sep 5th 2019, 19:49 |
ricksaccous |
is there a built in cake way to tunnel via ssh to access mysql |
# |
Sep 5th 2019, 18:56 |
slackebot |
to retrieve associated data twice removed with a single query. |
# |
Sep 5th 2019, 18:56 |
ckjksl |
yes, sorry, that was a typo on my part typing it into the chat. I couldn't edit it after I submitted the next comment. But the error i get remains the same: unable to find column 'Projects.projectCodes.title'. I've cheated for now by including it in the contain array: `->contain(['Projects'=>[...],'templateitems','Projects.ProjectCodes']` and stealing it from that the longer, roundabout way. It would still be useful to know if it's possible |
# |
Sep 5th 2019, 18:51 |
rochasmarcelo |
@ckjksl double 's' at ``` 'Projectss' => [```, should not be ```'Projects' =>[``` |
# |
Sep 5th 2019, 17:41 |
ckjksl |
Phew. Okay, so this query looks and works fine. The problem now is that I want the column of an associated data from Projects. I need: `Projects.projectCode.title`. |
# |
Sep 5th 2019, 17:35 |
ckjksl |
I'm currently doing a query and it looks like this: ` $otheritems = $this->projectitems->find()->where(['projectitem_id'=>$thisprojectitem_id]) ->contain([ 'projects' => [ 'fields' => [ // Aliased fields in contain() must include // the model prefix to be mapped correctly. 'projectname' => |
# |
Sep 5th 2019, 17:35 |
slackebot |
'Projects.name' ] ], 'projectitems' ])->sortBy('projectitems.created');` |
# |
Sep 5th 2019, 15:56 |
slackebot |
{"0":"public.people.landing","action":"display","controller":"Pages","plugin":null} | | members:display | /people/* | {"action":"display","controller":"Members","plugin":null} |``` |
# |
Sep 5th 2019, 15:56 |
this.impetus |
FWIW, ``` pages:display | /press | {"0":"public.press.landing","action":"display","controller":"Pages","plugin":null} | | reviews:display | /press/* | {"action":"display","controller":"Reviews","plugin":null} | | pages:display | /people | |
# |
Sep 5th 2019, 15:56 |
jotpe |
Hey! In my User Entity I have a virtualfield like this: https://book.cakephp.org/3.0/en/orm/entities.html#creating-virtual-fields. When I use the Authentication Plugins Helper like this `$this->Identity->get('name')` I get the User Entity. For some reason I cannot access the virtual field with `$user->full_name;` Why does this not work? |
# |
Sep 5th 2019, 15:54 |
this.impetus |
All well, in reality the redirected URLs will likely change, it's just the public-facing, semantically-nice URLs I'm currently concerned with, but I've never used the CLI for this, I'll take a peak, ty |
# |
Sep 5th 2019, 15:51 |
neon1024 |
You’re also assigning the same url to two different routes, so you’ll get duplicate content from an SEO point of view |
# |
Sep 5th 2019, 15:50 |
neon1024 |
Did you try `bin/cake routes` |
# |
Sep 5th 2019, 15:50 |
this.impetus |
Anyone even know how that's possible? Or whereabouts to looking for the problem? I am kind of just agape over hear |
# |
Sep 5th 2019, 15:43 |
slackebot |
$routes->connect('/press/*', ['controller' => 'Reviews', 'action' => 'display']);``` There isn't a controller named `People` or `Press, and both the `Members` and `Reviews` controllers are working as they should, *and* I can access `pages/public.press.landing` as a normal URL. |
# |
Sep 5th 2019, 15:24 |
neon1024 |
Which I think is 24 mins |
# |
Sep 5th 2019, 15:43 |
this.impetus |
Hi guys... very strange behavior I need help troubleshooting. This works fine ```$routes->connect('/people', ['controller' => 'Pages', 'action' => 'display', 'public.people.landing']); $routes->connect('/people/*', ['controller' => 'Members', 'action' => 'display']);``` but this throws a MissingController error ``` $routes->connect('/press', ['controller' => 'Pages', 'action' => 'display', 'public.press.landing']); |
# |
Sep 5th 2019, 15:23 |
neon1024 |
My php maxlifetime is set to 1440 |
# |
Sep 5th 2019, 15:23 |
neon1024 |
How can I extend my session login time? It seems adding `timeout => 15` to my `app.php` `Session` key doesn’t seem to work |
# |
Sep 5th 2019, 15:22 |
ricksaccous |
@david098 https://book.cakephp.org/3.0/en/orm/query-builder.html#filtering-by-associated-data |
# |
Sep 5th 2019, 14:47 |
itmpls |
gotcha |
# |
Sep 5th 2019, 14:46 |
dereuromark |
overdoing sth too early |
# |
Sep 5th 2019, 14:46 |
dereuromark |
too much pre-opt |
# |
Sep 5th 2019, 14:46 |
itmpls |
what's overkill? |
# |
Sep 5th 2019, 14:44 |
dereuromark |
you can do it, but it seems a bit overkill |
# |
Sep 5th 2019, 14:44 |
itmpls |
not in vendor |
# |
Sep 5th 2019, 14:43 |
itmpls |
i mean versus in App itself |
# |
Sep 5th 2019, 14:43 |
dereuromark |
if it is inside the same projects /plugins folder there are no additional costs usually, so thats pretty cheap compared to the vendor overhead. |
# |
Sep 5th 2019, 14:41 |
itmpls |
organization wise is it ideal to put your own custom library (only to be used by this current app) as its own . plugin? |
# |
Sep 5th 2019, 14:42 |
dereuromark |
why do you want to do it in the first place? |
# |
Sep 5th 2019, 14:40 |
ndm |
@alexdd55976 https://github.com/cakephp/bake/issues?q=is%3Aissue+as_array+is%3Aclosed |
# |
Sep 5th 2019, 14:41 |
ondrej.nedvidek |
definitively Nedvajz on fire today ! |