# |
Dec 24th 2019, 18:43 |
brian.french |
testing? |
# |
Dec 24th 2019, 18:43 |
brian.french |
When testing a controller that's returning a 500 on a $this->get(); is there a specific 'cake' way to debug what is causing the 500 in the controller you're test? |
# |
Dec 24th 2019, 18:42 |
brian.french |
Your code is out of context, but maybe change `return $q->limit(1);` to `return $q->limit(5);` ? |
# |
Dec 24th 2019, 18:17 |
hollistergraham123 |
I looked through the docs and it suggested something like this. But it still limited to 1 blog total being pulled back. |
# |
Dec 24th 2019, 18:15 |
hollistergraham123 |
How do I limit associations per row. I.e. I want to pull 5 blogs per category. |
# |
Dec 24th 2019, 17:38 |
brian.french |
Thanks @challgren and @john.zwarthoed |
# |
Dec 24th 2019, 15:58 |
devito |
seem to be having a bit of a hard time with this. i am making an api and when ever i try to do a post I get a csrf mismatch. in my application.php the csrf middleware is not qued up, instead it is in the routs file. i tried removing it completly from there however i still get csrf token mismatch errors when i try to post. Any ideas? |
# |
Dec 24th 2019, 15:27 |
loginews |
I had an issue, which I posted on our in-house internal blog: http://manuals.loginonline.net/badev/2019/12/24/debugging-cakephp-url-issue/ . I am not sure if this can help those who devised the Auth component. I solved my problem. Posting this here just in case. |
# |
Dec 24th 2019, 13:20 |
maymeow |
Hi. Wish you all Merry Christmas and many good projects :christmas_tree: |
# |
Dec 24th 2019, 11:30 |
nuzulfikrie |
how do i use Http:ParseRequest? |
# |
Dec 24th 2019, 11:29 |
nuzulfikrie |
support . I have this `/logout` wanted to form this `Array ( [controller] => Logout [pass] => Array ( ) [action] => index [plugin] => Manage [_matchedRoute] => /{controller} )` |
# |
Dec 24th 2019, 11:29 |
nuzulfikrie |
hi, |
# |
Dec 24th 2019, 09:53 |
challgren |
But $this->_getBodyAsString() also works too |
# |
Dec 24th 2019, 09:48 |
challgren |
Actually its `debug((string)$this->_response->getBody());` |
# |
Dec 24th 2019, 09:46 |
challgren |
You can use `$this->_response->getBody->getContents()` in your Integration test file |
# |
Dec 24th 2019, 08:26 |
john.zwarthoed |
@brian.french are you looking for: _getBodyAsString( ) ? |
# |
Dec 24th 2019, 07:53 |
megan |
Morning :wave: |
# |
Dec 24th 2019, 07:44 |
kani |
Hi |
# |
Dec 24th 2019, 07:12 |
brian.french |
One of mine is giving a 500, and i'd like to see what it's error is. |
# |
Dec 24th 2019, 07:12 |
brian.french |
For testing controllers, how can i actually get/see the output of the test from a $this->get('/plugin/controller/action'); ? |
# |
Dec 24th 2019, 06:00 |
brian.french |
Just curious since I feel like i'm polluting the history here with stuff regarding core projects, instead of genuine requests on usage. |
# |
Dec 24th 2019, 05:57 |
challgren |
I think it's for irc reasons |
# |
Dec 24th 2019, 05:56 |
brian.french |
That way we're not polluting the general support channel? |
# |
Dec 24th 2019, 05:55 |
brian.french |
to clarify Slack/Irc channels |
# |
Dec 24th 2019, 05:55 |
brian.french |
Any admins on? Would it be a good idea to create channels for each project in the cakephp namespace? like one for cakephp/upgrade, cakephp/app, cakephp-codesniffer, etc? |
# |
Dec 24th 2019, 05:19 |
brian.french |
Turned out the issue I was having with `cakephp/upgrade` was due to uncommitted changes that were effecting the specific files in the `src/Template` folder. I submitted [PR #132](https://github.com/cakephp/upgrade/pull/132) to catch if git fails. |
# |
Dec 24th 2019, 04:30 |
kailas |
i see. hrm. i don’t think i had that one on. anway, seems related to that. thanks for the response though! |
# |
Dec 24th 2019, 04:26 |
challgren |
social_accounts I believe |
# |
Dec 24th 2019, 04:25 |
kailas |
@challgren still getting the same error, but by disabling google authenticator and recaptcha, seems to work now. is there some other table that needs to be created for oauth2 logins like google? |
# |
Dec 24th 2019, 04:21 |
kailas |
hrm, no. will try that |
# |
Dec 24th 2019, 04:16 |
challgren |
you clear your orm cache? |
# |
Dec 24th 2019, 04:14 |
kailas |
I’m trying to get CakeDC/Users working with a custom users table. when trying to login with the user I created, I get an sql error “unknown column ‘secret’ in ‘field list’“. which is weird, since i’m not sure where that’s getting searched for. anyone know what could be going on? |
# |
Dec 24th 2019, 04:10 |
brian.french |
yeah, I will... |
# |
Dec 24th 2019, 04:10 |
challgren |
Open an issue so it can get fixed |
# |
Dec 24th 2019, 04:10 |
brian.french |
This seemed to work though: `fr3nch13/cakephp-jira$ ../../302dev/upgrade/bin/cake upgrade .` |
# |
Dec 24th 2019, 04:08 |
brian.french |
well, i guess it is, just something is failing: ```302dev/upgrade$ bin/cake upgrade ../../fr3nch13/cakephp-jira/ Moving templates fatal: '../../fr3nch13/cakephp-jira/src/Template' is outside repository``` |
# |
Dec 24th 2019, 04:06 |
brian.french |
The code to do it is there, but the default command `bin/cake upgrade /path/to/code` doesn't invoke it. |
# |
Dec 24th 2019, 04:04 |
challgren |
https://github.com/cakephp/upgrade/issues/126 |
# |
Dec 24th 2019, 04:03 |
challgren |
Yeah I reported that a while ago, thought it was fixed |
# |
Dec 24th 2019, 04:01 |
brian.french |
Ok, because the upgrade script isn't doing that. |
# |
Dec 24th 2019, 03:27 |
slackebot |
<challgren> |