Log message #4199315

# At Username Text
# Aug 22nd 2019, 06:20 admad wouldn't you get want you want by just using `AVG(total)` ?
# Aug 22nd 2019, 06:14 slackebot2 $query->newExpr('salesTotal/salesQuantity'), ]); ``` I'm getting `Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'salesTotal' in 'field list'`. Is there any way to reuse the two virtual (or how do I call them?) columns? Previously I'd try `'avgPrice' => $query->newExpr($query->func()->sum('Table.total').'/'.$query->func()->sum('Table.quantity'))` but that doesn't seem right
# Aug 22nd 2019, 06:14 mehov Hi guys, Trying to figure out how do I `SELECT` two virtual columns and have them divided too. Here's what I have: ``` $query->select([ 'salesTotal' => $query->func()->sum('Table.total'), 'salesQuantity' => $query->func()->sum('Table.quantity'), ]); ``` Here's what I'm trying ``` $query->select([ 'salesTotal' => $query->func()->sum('Table.total'), 'salesQuantity' => $query->func()->sum('Table.quantity'), 'avgPrice' =>
# Aug 22nd 2019, 04:44 challgren @rgabasa.mynimo have you read RFC 1738? http://www.faqs.org/rfcs/rfc1738.html
# Aug 22nd 2019, 02:03 slackebot2 with no problem but the problem is I need to create another logic so I don't want to do it like that.. May I know if how can I fix my problem? By the way this is my code in the routes.php Router::connect( '/:peña', array('controller' => 'controllername', 'action' => 'functionname', 'section' => 'peña' ), array('peña' => '(?i:peña)') );
# Aug 22nd 2019, 02:03 rgabasa.mynimo Hello Everyone, I already open up this concern of mine on August 20 but unfortunately I still encounter the same problem. I hope you can help me with this, thanks in advance. My problem : I tried to use a special character on my url like this www.domain.com/peña but unforunately it didn't now even though my server supports UTF8 , I don't know why it didn't work but when I try to do it like this www.domain.com?url=peña it will work
# Aug 22nd 2019, 00:32 cnizzardini I understand within the where operation I could probably cast to date with something like DATE(table_name.created) but is there another way to accomplish this? I'd like to avoid updating so much code.
# Aug 22nd 2019, 00:22 cnizzardini How do you tell the Cake ORM to treat a date/time field as a date field when doing like things like table_name.created = '2019-08-01'
# Aug 21st 2019, 22:07 khalid does someone knows what is it about?
# Aug 21st 2019, 22:06 khalid Hi everyone, on updating my ES documents I am getting this 'Param _version does not exist'
# Aug 21st 2019, 17:19 marek.sebera @admad neat, still required usage of Entity to get fields that are created through assoc is avoided using configuration array of the entity behavior, would it be possible to get those fields/categories/origins directly at cake-core ?
# Aug 21st 2019, 16:40 admad @btx https://github.com/ADmad/cakephp-i18n/blob/master/composer.json#L26
# Aug 21st 2019, 16:34 btx i think i’ll just go the route of loading the plugin in a blank app like @ricksaccous confirmed.
# Aug 21st 2019, 16:33 btx @admad i knew the first thing you’d say was to look at other plugins :P so i did. the issue I was having is how to test stuff that requires the cake core to be loaded
# Aug 21st 2019, 16:16 admad np
# Aug 21st 2019, 16:15 daniel.upshaw Well, at any rate, I appreciate your time
# Aug 21st 2019, 16:15 daniel.upshaw Ahh got it
# Aug 21st 2019, 16:15 admad which is why skeleton app no longer has it enabled by default
# Aug 21st 2019, 16:14 admad @daniel.upshaw like i said routes caching is a PITA, if you have anything unserializable it wont work. Also unless you have thousands of routes connected it wont give you any benefit
# Aug 21st 2019, 16:12 admad @marek.sebera https://github.com/riesenia/cakephp-duplicatable
# Aug 21st 2019, 16:09 daniel.upshaw And tinkering with the code that I was pasting did have an effect on whether the error would happen, so I hope I wasn't wasting your time completely
# Aug 21st 2019, 16:01 daniel.upshaw There does seem to be something shaky about the Route caching, so at least it uncovered something or other to keep an eye on in edge cases
# Aug 21st 2019, 15:59 marek.sebera Hi, trying to copy entities, is it possible on Cake\ORM\Entity to get list of properties, that are object-self (not virtual, not association/contain) ? Or is there better way to create entity-copy than unsetProperty on non-self-properties and using table->newEntity(oldEntity->toArray()) ? Thank you
# Aug 21st 2019, 15:54 daniel.upshaw Still, it's an oddity to be on the lookout for
# Aug 21st 2019, 15:53 daniel.upshaw Sorry about the PEBCAC issue @admad
# Aug 21st 2019, 15:52 daniel.upshaw The custom route didn't seem to be the culprit, but it was and in an unexpected place -- there's presumably no caching taking place there
# Aug 21st 2019, 15:52 daniel.upshaw I didn't notice it because disabling cache in the custom route didn't seem to have an effect
# Aug 21st 2019, 15:52 daniel.upshaw ``` public function __construct($template, $defaults = [], array $options = []) { parent::__construct($template, $defaults, $options); $this->redirectMapTable = TableRegistry::getTableLocator()->get('RedirectMap'); }```
# Aug 21st 2019, 15:51 daniel.upshaw It seems the problem was caused by this part of a custom route
# Aug 21st 2019, 15:51 daniel.upshaw Thanks for your time @admad , let me know if there's anything I can do, e.g. have a 6 pack delivered to you or donate somewhere
# Aug 21st 2019, 15:48 alexdd55976 nope, sorry
# Aug 21st 2019, 15:39 mdotobie @admad @daniel.upshaw @alexdd55976 Just out of curiosity, does anyone know what the logic was behind making frontend libraries available through packagist.org?
# Aug 21st 2019, 15:37 dereuromark xdebug would show you already basic path at least of input to output. and is free.
# Aug 21st 2019, 15:36 np ok, thanks
# Aug 21st 2019, 15:35 dereuromark no, but there is new relic and blackfire if you need professional tools.
# Aug 21st 2019, 15:34 np hello, Is there any software / extension for vscode to visualize the flow of a cakephp / php application? I must understand what and who going in very large cakephp 3 app.
# Aug 21st 2019, 15:31 daniel.upshaw So, just make a query at all is causing it
# Aug 21st 2019, 15:30 daniel.upshaw Even overwriting the variable immediately: ```$tagRoutesPiped = (string)implode( '|', TableRegistry::getTableLocator() ->get('Tags') ->find('all') ->select(['alias']) ->where(['route' => 1]) ->all() ->extract('alias') ->toArray() ); $tagRoutesPiped = 'test';```
# Aug 21st 2019, 15:29 daniel.upshaw @admad When the cache is removed entirely, the error happens 100% of the time on every page load
# Aug 21st 2019, 15:28 mdotobie Thanks for the tips @admad @daniel.upshaw @alexdd55976
# Aug 21st 2019, 15:26 daniel.upshaw So it's happening before it jumps inside the scope even