# |
Nov 7th 2019, 13:05 |
jotpe |
@dereuromark is there a example for async usage of cakephp-email-queue or cakephp-queue? |
# |
Nov 7th 2019, 13:01 |
dev.cyrusjayson |
it just a sample. just the way how I put http error code. thanks a lot @eduardo.miguel |
# |
Nov 7th 2019, 13:00 |
eduardo.miguel |
i never try to tinker with 200 or 500, maybe some 4xx ... nice |
# |
Nov 7th 2019, 12:59 |
dev.cyrusjayson |
oh it works! hahaha |
# |
Nov 7th 2019, 12:59 |
dev.cyrusjayson |
didnt work |
# |
Nov 7th 2019, 12:58 |
eduardo.miguel |
@dev.cyrusjayson response->withStatus(500); |
# |
Nov 7th 2019, 12:58 |
dereuromark |
@jotpe Make it async, use queue. best not to tigger stuff sync if not needed |
# |
Nov 7th 2019, 12:55 |
dev.cyrusjayson |
how to set http error code 200 or 500? ``` $this->response = $this->response ->withType('application/json') ->withStringBody(json_encode([ 'data'=>$data ]));``` |
# |
Nov 7th 2019, 12:53 |
jotpe |
https://github.com/lorenzo/cakephp-email-queue |
# |
Nov 7th 2019, 12:52 |
jotpe |
Acutally I use a queue, but want to trigger the shell command |
# |
Nov 7th 2019, 12:51 |
jotpe |
@dereuromark you mean for the shell command? |
# |
Nov 7th 2019, 12:49 |
peter349 |
$this->post('/api/internal/occasions',$data); im getting a 404 for this |
# |
Nov 7th 2019, 12:48 |
peter349 |
but how should i call it in the test? |
# |
Nov 7th 2019, 12:48 |
peter349 |
through ajax id be using `/api/internal/occasions.json` |
# |
Nov 7th 2019, 12:48 |
peter349 |
@admad Im using a crud plugin, with .json route for the api |
# |
Nov 7th 2019, 12:44 |
admad |
@peter349 https://book.cakephp.org/3/en/development/testing.html#controller-integration-testing |
# |
Nov 7th 2019, 12:39 |
dereuromark |
If it can be async use queue^^ |
# |
Nov 7th 2019, 12:31 |
jotpe |
Oh nice thanks @rajpalsingh.jecrc :slightly_smiling_face: |
# |
Nov 7th 2019, 12:30 |
peter349 |
i need to test a POST action |
# |
Nov 7th 2019, 12:29 |
peter349 |
Hi , how do I perform integration test for cakephp api |
# |
Nov 7th 2019, 12:28 |
rajpalsingh.jecrc |
https://medium.com/@narendravaghela/cakephp-execute-shell-command-from-controller-90c8323558a @jotpe this can help you |
# |
Nov 7th 2019, 12:18 |
jotpe |
Is it possible to trigger a console command via controller action/request? |
# |
Nov 7th 2019, 12:14 |
nayakvradhit |
Ok thanks |
# |
Nov 7th 2019, 12:05 |
rochasmarcelo |
Also if you check the docs there is a page for configurations https://github.com/CakeDC/users/blob/master/Docs/Documentation/Configuration.md |
# |
Nov 7th 2019, 12:04 |
rochasmarcelo |
Products controller does not exists in Users plugin |
# |
Nov 7th 2019, 12:04 |
rochasmarcelo |
You must add 'plugin' => false |
# |
Nov 7th 2019, 11:23 |
leonardo.crecente |
thanks @admad |
# |
Nov 7th 2019, 11:22 |
alexdd55976 |
maybe you do some pr(), debug(), whatever due to debugging in your geocoding file which is printed when you include it |
# |
Nov 7th 2019, 11:22 |
admad |
None, just need to update rewrite rules in htaccess to ignore URLs starting with /blog/ |
# |
Nov 7th 2019, 11:18 |
leonardo.crecente |
is there any problem to install wordpress in cakephp 2.x app/webroot/blog/ subfolder? |
# |
Nov 7th 2019, 11:16 |
ndm |
No problem... I think I should also note that using `sys.list_drop()` is probably the safest way to modify the mode at runtime, ie something like: `SET SESSION sql_mode = sys.list_drop(@@session.sql_mode, 'ONLY_FULL_GROUP_BY')` |
# |
Nov 7th 2019, 11:12 |
yadav.manu36 |
@ndm thanks, it is working now |
# |
Nov 7th 2019, 11:05 |
ndm |
You can try using the `init` option of your datasource config to run a `SET` query, like `SET SESSION sql_mode='your desired mode'` |
# |
Nov 7th 2019, 11:01 |
yadav.manu36 |
it is not possible to off strict mode disable from app.php Datasources |
# |
Nov 7th 2019, 11:01 |
ndm |
If you do so, make sure to properly cover your functionality with tests, as MySQL is allowed to pick values of a group at random with `ONLY_FULL_GROUP_BY` disabled! |
# |
Nov 7th 2019, 11:01 |
nayakvradhit |
I did not get it sorry |
# |
Nov 7th 2019, 11:00 |
challgren |
https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html |
# |
Nov 7th 2019, 11:00 |
yadav.manu36 |
from where? from app.php file? |
# |
Nov 7th 2019, 10:59 |
challgren |
@yadav.manu36 turn off ONLY_FULL_GROUP_BY SQL mode |
# |
Nov 7th 2019, 10:57 |
yadav.manu36 |
How to resolve this issue in cakephp 3 |
# |
Nov 7th 2019, 10:55 |
alexdd55976 |
you have an output in geocoded that comes before tthe pdf file putput? |