Log message #4053738

# At Username Text
# Jul 18th 2017, 19:21 nicolas.r Ok but I don't understand what do you want to do sorry
# Jul 18th 2017, 19:21 privera085 and i use acl for auth
# Jul 18th 2017, 19:20 privera085 a intranet
# Jul 18th 2017, 19:20 nicolas.r what* ?
# Jul 18th 2017, 19:20 nicolas.r more precisions please ? How do you want to do with slack and cake ?
# Jul 18th 2017, 19:19 privera085 ?
# Jul 18th 2017, 19:19 privera085 como puedo integrar slack a mi proyecto cakephp 3
# Jul 18th 2017, 19:19 slackebot we're doing something wrong? It seems unlikely that this would be an unnoticed bug in the core, but I'm out of ideas.
# Jul 18th 2017, 19:19 phantomwatson The docs (https://book.cakephp.org/3.0/en/development/testing.html#controller-integration-testing>) show an example of firing off a GET request with a query string like `$this->get('/articles?page=1');`, but @ericadeefox and I are finding that in two different projects on two different systems, the controller doesn't actually get any of the data passed to it from the query string. `$this->request-getQuery()` returns an empty array. Any
# Jul 18th 2017, 19:19 nicolas.r Hi
# Jul 18th 2017, 19:19 privera085 hola
# Jul 18th 2017, 18:29 mikesmoniker I would love to be able to do $user->groups->filter(…) etc.
# Jul 18th 2017, 18:22 phantomwatson If you don't break a bunch of stuff, why bother?
# Jul 18th 2017, 18:21 phantomwatson Well, backwards-compatibility breaks are what major version changes are for. :slightly_smiling_face:
# Jul 18th 2017, 18:14 mikesmoniker Anyone know if there’s been any discussion about making associations collections instead of arrays in Cake 4? (BC break, I know…)
# Jul 18th 2017, 18:07 nicolas.r i'll take a llok at
# Jul 18th 2017, 18:06 phantomwatson Might want to use `$query->func()->max('states_id')`. https://book.cakephp.org/3.0/en/orm/query-builder.html#using-sql-functions
# Jul 18th 2017, 18:05 nicolas.r Something is missing or badly build ..
# Jul 18th 2017, 18:04 nicolas.r my subquery .. $subQuery = $query->buildStatement( array( 'fields' => array('original_demande', 'Max(States_id)'), 'table' => $db->fullTableName($this->Demandes), ));
# Jul 18th 2017, 18:04 nicolas.r the subquery stuck me ..
# Jul 18th 2017, 18:04 nicolas.r I try this ... $query = $this->Demandes->find() ->select(['*']) ->join([ 'table' => 'Demandes', 'alias' => 'd', 'type' => 'INNER', 'conditions' => 'Demandes.original_demande = ' . $subQuery]); But I dont know how to continue this ...
# Jul 18th 2017, 18:03 nicolas.r 3.4
# Jul 18th 2017, 18:03 phantomwatson CakePHP 2 or 3?
# Jul 18th 2017, 18:02 nicolas.r Hi guys, I'm stuck for 2 days ago now ... I try to convert a sql query to the cake php format .. Can you help me ? this is the damn query : "SELECT d.* FROM demandes d INNER JOIN ( SELECT original_demande, MAX(states_id) AS states_id FROM demandes GROUP BY original_demande ) grouped ON d.original_demande = grouped.original_demande AND d.states_id = grouped.states_id"
# Jul 18th 2017, 17:06 chris-andre Regarding middleware, I have something to learn (as well)
# Jul 18th 2017, 17:05 admad Even better way than serving the images through controller is through middleware instead
# Jul 18th 2017, 16:56 chris-andre Yes, right. Fair point. I'll go change my piece of code right away :P
# Jul 18th 2017, 16:54 hmic another thing i forgot to mention: the page will only start rendering *anything* after the whole html got loaded - if that contains 1MB of image data (only) - you guess what happens - white page for *seconds*
# Jul 18th 2017, 16:52 hmic without any additional setup this requires your apps auth to allow the url from the controller... very convenient IMHO
# Jul 18th 2017, 16:52 chris-andre Yes @saeideng . At most 10 images.
# Jul 18th 2017, 16:51 chris-andre Right, good points @hmic . Thanks. I think of the option/example you told.
# Jul 18th 2017, 16:50 saeideng your images output is like `img ... ><img ... >.............. <img..` ??:grinning:
# Jul 18th 2017, 16:50 hmic this makes (only) sense to embed *small* images to not have the overhead of doing another request to the webserver - this means: 1k or less for me. like icons. usually you would not even bother to encode them dynamically but put them base64 encoded in the markup, which is especially beneficial on mobile
# Jul 18th 2017, 16:48 hmic you would rather create an controller action like: function getImage($photo) { ob_end_flush(); readfile($this->Image->imageUrl($photo)); } and link to that in the img src
# Jul 18th 2017, 16:48 chris-andre Why I'm asking, didn't really think of that.
# Jul 18th 2017, 16:47 saeideng yes and no
# Jul 18th 2017, 16:47 chris-andre :oncoming_police_car: Allright. So it is clearly a bad idea
# Jul 18th 2017, 16:46 hmic and the browsers, especially mobile ones, will have a hard time decoding the 100MBs of base64 encoded data
# Jul 18th 2017, 16:45 hmic you add 1/3rd of additional traffic overhead on the webserver too for encoding them base64
# Jul 18th 2017, 16:45 hmic you would need your php to buffer all that crap, using up *lots* of memory
# Jul 18th 2017, 16:44 hmic and displaying many of them?