# |
Sep 13th 2019, 08:10 |
javier.villanueva |
savemany returns false, but no errors in debug |
# |
Sep 13th 2019, 08:10 |
admad |
you have the query log in debugkit |
# |
Sep 13th 2019, 08:09 |
javier.villanueva |
I use saveMany to save any entities, but there are any problem.... Is there any log to see more info? |
# |
Sep 13th 2019, 08:09 |
birdy247 |
:slightly_smiling_face: |
# |
Sep 13th 2019, 08:09 |
admad |
i think of myself and simply mad |
# |
Sep 13th 2019, 08:08 |
birdy247 |
@admad Some would say you are a genious |
# |
Sep 13th 2019, 08:07 |
admad |
@birdy247 `$uri = $this->request->getUri()->withHost($newHost); return $this->redirect((string)$uri);` |
# |
Sep 13th 2019, 08:06 |
birdy247 |
parse_url($this->getRequest()->getUri()) |
# |
Sep 13th 2019, 08:04 |
birdy247 |
@admad this is waht I have decided. I was looking for a method on getRequest->getUri and couldnt find one |
# |
Sep 13th 2019, 08:04 |
admad |
you need parse_url() at best |
# |
Sep 13th 2019, 08:03 |
admad |
@birdy247 if all you need to do is change the host of the URL why do you need to bother with router? just use basic string manipulation |
# |
Sep 13th 2019, 07:53 |
challgren |
https://api.cakephp.org/3.8/class-Cake.Routing.Router.html#_url |
# |
Sep 13th 2019, 07:52 |
birdy247 |
but how would we rebuild the URL? |
# |
Sep 13th 2019, 07:52 |
birdy247 |
Yes |
# |
Sep 13th 2019, 07:52 |
challgren |
_host in the options |
# |
Sep 13th 2019, 07:52 |
birdy247 |
is there a way to simply set the host on a current route? |
# |
Sep 13th 2019, 07:51 |
challgren |
Cake specializes in magic! |
# |
Sep 13th 2019, 07:51 |
birdy247 |
When a user navigates to a given url, we want to keep the same URL but change the host |
# |
Sep 13th 2019, 07:51 |
birdy247 |
I am trying to do some redirect magic |
# |
Sep 13th 2019, 07:50 |
challgren |
Anyone have any good articles for running cake on EC2? |
# |
Sep 13th 2019, 07:49 |
birdy247 |
Morning |
# |
Sep 13th 2019, 07:28 |
jotpe |
Morning |
# |
Sep 13th 2019, 07:24 |
admad |
@val use `->distinct(true)` instead of specifying fields |
# |
Sep 13th 2019, 07:16 |
challgren |
Could you remove the group by on the query? do your distinct() and then groupBy() |
# |
Sep 13th 2019, 07:14 |
challgren |
Damm |
# |
Sep 13th 2019, 07:13 |
valerij.bancer |
That doesn't work either - `PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'DISTINCT MyModel.name' in 'field list'` |
# |
Sep 13th 2019, 07:11 |
challgren |
wouldnt it be ->select([‘DISTINCT name’]) |
# |
Sep 13th 2019, 07:10 |
valerij.bancer |
I don't wish that. In 2.x we have `'fields' => ['DISTINCT MyModel.name', ...]` but that does not work in 3.x |
# |
Sep 13th 2019, 06:43 |
conehead |
You can execute SQL directly if you wish |
# |
Sep 13th 2019, 06:39 |
valerij.bancer |
Hi, how to execute `SELECT DISTINCT ...` in 3.x without using `GROUP BY` that is generated by `distinct()` method? |
# |
Sep 13th 2019, 06:07 |
conehead |
Anyone using `RequestPolicy` for `RequestAuthorization`? Got a strong feeling this is bugged :( |
# |
Sep 13th 2019, 05:43 |
javier.villanueva |
thanks @challgren |
# |
Sep 13th 2019, 05:43 |
javier.villanueva |
yes |
# |
Sep 13th 2019, 05:41 |
challgren |
not 100% sure though |
# |
Sep 13th 2019, 05:40 |
challgren |
@javier.villanueva I think findAll(Query $query) |
# |
Sep 13th 2019, 05:36 |
javier.villanueva |
can I set a default finder for an entity? I know that I can set default finder for their associations... |
# |
Sep 13th 2019, 05:30 |
javier.villanueva |
morning all |
# |
Sep 13th 2019, 05:11 |
conehead |
Hm I am trying to switch to the Auth middleware. When loading the `Authorization` plugin I can define `skipAuthorization`. Am I only able to set this per action, but not per controller? In case I have some methods with the same name but some should be authorized and some should not |
# |
Sep 13th 2019, 05:09 |
conehead |
Good morning guys! |
# |
Sep 13th 2019, 01:43 |
D-rex |
I have google authenticator to false so I dont know why its checking |
# |
Sep 13th 2019, 01:43 |
D-rex |
Installed cakedc Users plugin and now im getting error "Invalid config for 'GoogleAuthenticator.checker', '' does not implement 'CakeDC\Users\Auth\TwoFactorAuthenticationCheckerInterface' |