# |
Jan 21st 2020, 12:21 |
jotpe |
Hey, what's the correct way of passing a finder to contain for pagination? |
# |
Jan 21st 2020, 12:02 |
martin |
https://github.com/cakephp/cakephp/blob/3.next/src/Error/ExceptionRenderer.php#L141 this, so I think it is fixed when we migrate to 4, need plan to do that :P |
# |
Jan 21st 2020, 12:00 |
martin |
I see in ExceptionRenderer.php that a new response in created, but don't see that in the cake 4 version |
# |
Jan 21st 2020, 11:51 |
martin |
I set a cors header in middleware, but when an error occurs like validation error with crud it does not send that header anymore |
# |
Jan 21st 2020, 11:48 |
martin |
When an exception is thrown, does it ignore the headers I did set in a middleware? |
# |
Jan 21st 2020, 10:42 |
challgren |
just before your save do a debug($listing) and paste that here, also probably comment out the redirect for now |
# |
Jan 21st 2020, 10:41 |
slackebot |
<matiur756> |
# |
Jan 21st 2020, 10:40 |
challgren |
Show your entity class please |
# |
Jan 21st 2020, 10:39 |
matiur756 |
@challgren but how to pass custom value this title field |
# |
Jan 21st 2020, 10:39 |
matiur756 |
@challgren when get data this data , i get this array: <pre class="pr">Array ( [categories] => 4,5,6 [title] => grumbledog test123c2 [address] => 8500 Pena Boulevard,Denver,CO,US [address_2] => 44 [phone] => 6754321 [web_address] => ww.gff.com [images] => [lat] => 20.48 [lng] => 30.438 [business_type] => 1 )</pre> |
# |
Jan 21st 2020, 10:38 |
challgren |
Check the SQL log |
# |
Jan 21st 2020, 10:38 |
challgren |
Your in debug mode correct? |
# |
Jan 21st 2020, 10:38 |
matiur756 |
@challgren already clear that but still same problem |
# |
Jan 21st 2020, 10:35 |
challgren |
https://book.cakephp.org/3/en/console-and-shells/schema-cache.html |
# |
Jan 21st 2020, 10:35 |
challgren |
sorry bin/cake schema_cache clear |
# |
Jan 21st 2020, 10:34 |
matiur756 |
okay |
# |
Jan 21st 2020, 10:34 |
challgren |
try bin/cake orm_cache clear I think |
# |
Jan 21st 2020, 10:34 |
matiur756 |
yes |
# |
Jan 21st 2020, 10:34 |
challgren |
did you recently add the title field? |
# |
Jan 21st 2020, 10:34 |
matiur756 |
@challgren how to set custom value in field cakePHP 3.8 in controller? |
# |
Jan 21st 2020, 10:32 |
matiur756 |
@challgren yes |
# |
Jan 21st 2020, 10:32 |
challgren |
@matiur756 are you using cake 3.8? |
# |
Jan 21st 2020, 10:30 |
jotpe |
What happens if you debug? Did you try to get validation errors? debug($listing->getErrors()); |
# |
Jan 21st 2020, 10:29 |
matiur756 |
yes |
# |
Jan 21st 2020, 10:28 |
jotpe |
Has your Listing Class a title in accessible? |
# |
Jan 21st 2020, 10:28 |
jotpe |
@matiur756 what happens if you debug your Entity after you set the title? `debug($listing)` |
# |
Jan 21st 2020, 10:27 |
matiur756 |
cakephp setting a value in controller not working. please help me |
# |
Jan 21st 2020, 10:24 |
slackebot |
<jotpe> |
# |
Jan 21st 2020, 10:23 |
jotpe |
I have a route, which uses a param. For some reason the param isn't passed to the Paginator. How can I accomplish this? |
# |
Jan 21st 2020, 10:05 |
jotpe |
Morning |
# |
Jan 21st 2020, 08:07 |
spriz |
@walid537 I'd also shoot a look at the follow-up discussion here in tha case :) https://github.com/FriendsOfCake/awesome-cakephp/pull/333 |
# |
Jan 21st 2020, 07:36 |
heke |
good morning @javier.villanueva |
# |
Jan 21st 2020, 07:36 |
javier.villanueva |
morning all |
# |
Jan 21st 2020, 06:51 |
conehead |
@walid Maybe have a look at this. https://discourse.cakephp.org/t/cake-dm-a-domain-driven-design-approach-to-cakephp/6975 https://github.com/pabloelcolombiano/cake-dm I did not try it, but looks like something you could use. Personally I am using plugins |
# |
Jan 21st 2020, 06:41 |
conehead |
But I would strongly advise not to edit "app/vendor/cakephp/authentication/src/Identifier/Resolver/OrmResolver.php" Create your own file and use the same code you are using right now. This way your changes will not be lost when cakephp has an update. additionally this way it should not be recognized by git |
# |
Jan 20th 2020, 22:26 |
mark.mikkelson |
oh thanks very much !! ill take a look |
# |
Jan 20th 2020, 22:22 |
slackebot |
work like `$query->from(['Alias' => $subquery])->order(['Alias.created'])` |
# |
Jan 20th 2020, 22:22 |
ndm |
For that you'd first have to actually create a union query, that is create separate queries and combine them using the queries `union()`/`unionAll()` method https://book.cakephp.org/4/en/orm/query-builder.html#unions You could then either use `epilog()` to append an order clause https://stackoverflow.com/questions/29379579/how-do-you-modify-a-union-query-in-cakephp-3/29386189#29386189 or if prefer use the union query as a subquery, which should |
# |
Jan 20th 2020, 22:14 |
mark.mikkelson |
something like that |
# |
Jan 20th 2020, 22:14 |
mark.mikkelson |
select * from( select 'Chats' as Deal, id, date from Chats Union Select 'Tasks' as Deal, id, date, from Tasks Union Select 'Calls' as Deal, id, date from Calls ) Order by date |
# |
Jan 20th 2020, 22:05 |
ndm |
maybe explain what exactly you're looking for SQL wise |