# |
Jul 17th 2018, 22:19 |
hippo |
nvm I think I have the issue |
# |
Jul 17th 2018, 22:18 |
saeideng |
and test again |
# |
Jul 17th 2018, 22:18 |
hippo |
When it's off all I get is ``` Cake\Controller\Exception\SecurityException: The request has been black-holed ``` |
# |
Jul 17th 2018, 22:18 |
saeideng |
turn off |
# |
Jul 17th 2018, 22:17 |
hippo |
yeah |
# |
Jul 17th 2018, 22:17 |
saeideng |
is debug on? |
# |
Jul 17th 2018, 22:16 |
hippo |
Which means there is no response to test against.. |
# |
Jul 17th 2018, 22:16 |
hippo |
`_buildRequest` doesn't actually send the request though. |
# |
Jul 17th 2018, 22:15 |
saeideng |
`_sendRequest` and `post` is same |
# |
Jul 17th 2018, 22:13 |
hippo |
I tried `$this->_sendRequest('/admin/apps/approve/2', 'POST', []);` and it gave the same result. :S |
# |
Jul 17th 2018, 22:10 |
saeideng |
$this->_buildRequest(''/admin/apps/approve/2'', 'POST', $data); |
# |
Jul 17th 2018, 22:10 |
saeideng |
use this method and see result |
# |
Jul 17th 2018, 22:09 |
saeideng |
@hippo |
# |
Jul 17th 2018, 22:09 |
saeideng |
hi |
# |
Jul 17th 2018, 22:02 |
hippo |
Upgrading to 3.5.17 didn't work :S |
# |
Jul 17th 2018, 21:44 |
hippo |
nvm I see there's been some updates made from what I have.. I'll try that first.. |
# |
Jul 17th 2018, 21:41 |
hippo |
Had a quick look over the security component and how the integration test adds the tokens but I couldn't see where it was going wrong :S |
# |
Jul 17th 2018, 21:40 |
hippo |
Hi everyone :slightly_smiling_face: I'm trying to test a method but keep getting "Invalid security debug token". ``` $this->enableCsrfToken(); $this->enableSecurityToken(); $this->enableRetainFlashMessages(); $this->post('/admin/apps/approve/2'); ``` |
# |
Jul 17th 2018, 20:47 |
ricksaccous |
;) |
# |
Jul 17th 2018, 20:47 |
ricksaccous |
'url' => array('controller' => 'whatever', 'action' => 'whenever') |
# |
Jul 17th 2018, 20:47 |
ricksaccous |
it doesn't want an actual url, but the url array |
# |
Jul 17th 2018, 20:46 |
ricksaccous |
'url' option in Form accepts an array |
# |
Jul 17th 2018, 20:46 |
ricksaccous |
to url |
# |
Jul 17th 2018, 20:46 |
ricksaccous |
you don't need to feed $this->Html->url |
# |
Jul 17th 2018, 20:34 |
mr.mjsm |
hello everyone, how to submit a form into another controller ? i found online people use this "$this->Form->create('Cmt', array('url'=>$this->Html->url(array('controller'=>'cmts', 'action'=>'add'))));" but it is not working, i tried to change Html to Form but same problem |
# |
Jul 17th 2018, 19:56 |
rightscoreanalysis |
ahhh I have to use 'sum' not 'sumOf'!!! |
# |
Jul 17th 2018, 19:45 |
rightscoreanalysis |
... which doesn't work |
# |
Jul 17th 2018, 19:43 |
rightscoreanalysis |
that's right, and I need a sum |
# |
Jul 17th 2018, 19:43 |
ricksaccous |
rather than the actual summed score |
# |
Jul 17th 2018, 19:43 |
ricksaccous |
wouldn't that get a count of all records though |
# |
Jul 17th 2018, 19:42 |
ricksaccous |
great |
# |
Jul 17th 2018, 19:42 |
rightscoreanalysis |
if I change the func to count rather than sumOf it works fine without to Array |
# |
Jul 17th 2018, 19:36 |
ricksaccous |
maybe i'm wrong about that |
# |
Jul 17th 2018, 19:36 |
ricksaccous |
you would have to do a ->toArray to foreach it wait |
# |
Jul 17th 2018, 19:35 |
ricksaccous |
you can't foreach it |
# |
Jul 17th 2018, 19:35 |
ricksaccous |
it's an object |
# |
Jul 17th 2018, 19:33 |
rightscoreanalysis |
when i try to foreach the result: ______________________________ Warning (2): Invalid argument supplied for foreach() |
# |
Jul 17th 2018, 19:30 |
rightscoreanalysis |
I want to get a list of the highest rated Articles |
# |
Jul 17th 2018, 19:30 |
rightscoreanalysis |
Articles and Ratings |
# |
Jul 17th 2018, 19:30 |
rightscoreanalysis |
File uploaded https://cakesf.slack.com/files/U8TPM938F/FBRV81PN0/-.php / https://slack-files.com/T053DPNCM-FBRV81PN0-49e83d8861 |
# |
Jul 17th 2018, 19:29 |
rightscoreanalysis |
Can anyone tell me what is wrong with this: |