Log message #4096573

# At Username Text
# Nov 14th 2017, 10:36 neon1024 Well pick the right method ;)
# Nov 14th 2017, 10:35 obinoob neon1024 Error: [BadMethodCallException] Method getQuery does not exist
# Nov 14th 2017, 10:34 obinoob perhaps I better set or compact from controller ...
# Nov 14th 2017, 10:34 neon1024 Then you have a bug elsewhere in your code. Check your logs
# Nov 14th 2017, 10:34 obinoob neon1024 well I've tested that and I get a 500 status code :/
# Nov 14th 2017, 10:33 neon1024 Where $this is a View instance, which has the request -> https://github.com/cakephp/cakephp/blob/master/src/View/View.php#L202-L209
# Nov 14th 2017, 10:33 neon1024 obinoob, Yes. It’s just `$this->request->getQuery()`
# Nov 14th 2017, 10:32 neon1024 https://book.cakephp.org/3.0/en/orm/query-builder.html#advanced-conditions
# Nov 14th 2017, 10:32 obinoob Hi, Is there any way I can access the all url query string from a view without using $_SERVER['QUERY_STRING'] in worst case? Or filter_input(INPUT_SERVER, 'QUERY_STRING', FILTER_SANITIZE_SPECIAL_CHARS)? I've read this page but didn't have found any method that actually works... https://book.cakephp.org/3.0/en/controllers/request-response.html#query-string-parameters
# Nov 14th 2017, 10:32 neon1024 I don’t use the `gte()` functions, but you could use those if you wanted I suppose
# Nov 14th 2017, 10:31 neon1024 If you need help with an `if()` statement ;P
# Nov 14th 2017, 10:31 neon1024 Just as you said you would.
# Nov 14th 2017, 10:29 willem and how would i do this in CakePHP 3 ?
# Nov 14th 2017, 10:20 neon1024 Yes
# Nov 14th 2017, 10:12 willem is that possible?
# Nov 14th 2017, 10:11 willem what would be the best way to create a find for a date between start_date and end_date; where end_date should only be used if not null. So ` if (end_date is not null) then today between start_date and end_date else today >= start_date `
# Nov 14th 2017, 09:55 meowcate Same here
# Nov 14th 2017, 09:42 neon1024 Morning everyone! :slightly_smiling_face:
# Nov 14th 2017, 08:55 admad gtg
# Nov 14th 2017, 08:55 admad instead of relying on security token, use 'fieldList' https://book.cakephp.org/3.0/en/orm/saving-data.html#avoiding-property-mass-assignment-attacks
# Nov 14th 2017, 08:52 admad a solution even if achievable would be too complicated and not worth the maintenance effort
# Nov 14th 2017, 08:51 sniedermaier ok, so i take a workaround and submit to a different url via ajax and use the action for the preview ... but would be nice, if we could get this as an improvement to FormHelper/SecurityComponent
# Nov 14th 2017, 08:49 admad the security token includes the URL to submit to, so it's not possible to generate a token which can be valid for more than one action url
# Nov 14th 2017, 08:49 sniedermaier val=null and val=false doesn't remove the value either ;)
# Nov 14th 2017, 08:48 admad meh nvm it won't work either
# Nov 14th 2017, 08:47 admad also better to use form->submit() to generate input type=submit
# Nov 14th 2017, 08:46 admad no, val => null or false so that "value" attribute isnt generated at all
# Nov 14th 2017, 08:46 birdy247 :slightly_smiling_face:
# Nov 14th 2017, 08:45 sniedermaier @admad `$this->Form->control('preview', ['val' => '']);`?
# Nov 14th 2017, 08:44 admad the price you pay for using windows :slightly_smiling_face:
# Nov 14th 2017, 08:43 birdy247 morning rant over
# Nov 14th 2017, 08:43 birdy247 bloody windows fall update killing my vagrant
# Nov 14th 2017, 08:43 birdy247 Hey @admad
# Nov 14th 2017, 08:43 admad moin birdy
# Nov 14th 2017, 08:42 admad i have a feeling it will
# Nov 14th 2017, 08:42 birdy247 morning
# Nov 14th 2017, 08:42 admad @sniedermaier regarding https://github.com/cakephp/cakephp/issues/11427 does submit to /url2 work if you remove "value" from input with id = "preview" ?
# Nov 14th 2017, 08:40 sniedermaier ok, i'll rework the code ;) thanks
# Nov 14th 2017, 08:37 admad regardless don't redirect on server side for ajax requests
# Nov 14th 2017, 08:35 sniedermaier its not for success/failure. I have dozens of page contents and a controller for each "type" (identified by a db col). the first controller checks for which specific controller handles the "action" something like "Pages" redirects to "NewsPage", "ProductPage" and so on
# Nov 14th 2017, 08:32 admad "I'm using a Controller to redirect to an other controller wihch has the form in its template" your mean using $this->redirect() for ajax request? If so don't do that. Check for success/failure on client side and do redirect there