Log message #4202447

# At Username Text
# Sep 10th 2019, 08:27 neon1024 Magic!
# Sep 10th 2019, 08:27 admad how do think HtmlHelper::image() gets it's image path? :slightly_smiling_face:
# Sep 10th 2019, 08:27 neon1024 I tend to use `$this->Html->image('foo.png')`
# Sep 10th 2019, 08:26 neon1024 Yeah, but your ticket said Url::image right?
# Sep 10th 2019, 08:26 admad @neon1024 you don't use `HtmlHelper::image()`?
# Sep 10th 2019, 08:25 admad > But honestly how would you even build it with an array? Since its not linked to any controllers My point exactly
# Sep 10th 2019, 08:22 neon1024 I don’t use those methods @admad
# Sep 10th 2019, 08:21 challgren But honestly how would you even build it with an array? Since its not linked to any controllers
# Sep 10th 2019, 08:20 challgren So yeah not a breaking change for me really
# Sep 10th 2019, 08:19 challgren But $this->Url I only use 5 times
# Sep 10th 2019, 08:19 slackebot #3498db; border-radius: 5px; box-sizing: border-box; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-transform: capitalize; border-color: #3498db;">View Audit</a>```
# Sep 10th 2019, 08:19 challgren ```<a href="<?= $this->Url->build(['controller' => 'EnergyAudits', 'action' => 'view', $energyAudit->id], ['fullBase' => true]) ?>" target="_blank" style="display: inline-block; color: #ffffff; background-color: #3498db; border: solid 2px
# Sep 10th 2019, 08:18 admad you are using string `'/favicon-32x32.png'` not url array :slightly_smiling_face:
# Sep 10th 2019, 08:16 challgren `<img src=“<?= $this->Url->image(‘/favicon-32x32.png’, [‘fullBase’ => true]) ?>” width=“41" height=“41” alt=“Logo” align=“center” style=“border: none; -ms-interpolation-mode: bicubic; max-width: 100%;“>`
# Sep 10th 2019, 08:16 challgren I use it one time
# Sep 10th 2019, 08:15 challgren When I first started cake I though it was needed but pretty much stopped using html helper for things like that
# Sep 10th 2019, 08:15 admad My opinion is there's no need to :slightly_smiling_face:
# Sep 10th 2019, 08:14 admad yup
# Sep 10th 2019, 08:14 challgren Like /img/?
# Sep 10th 2019, 08:14 admad does any use URL arrays to generate URLs for assets?
# Sep 10th 2019, 08:14 admad guys your feedback here would be helpful https://github.com/cakephp/cakephp/pull/13630#issuecomment-529765323
# Sep 10th 2019, 08:13 challgren Yeah… Everyone must be wrapping up projects
# Sep 10th 2019, 07:55 alexdd55976 its quiet week in here
# Sep 10th 2019, 07:07 alexdd55976 morning fellows
# Sep 10th 2019, 06:20 javier.villanueva morning all
# Sep 10th 2019, 01:58 latenal never mind, I removed Subscriptions from the expression and it worked
# Sep 10th 2019, 01:34 latenal Hey guys! How do you increment a value in database? ``` $subscriptionsTable = TableRegistry::getTableLocator()->get('Subscriptions'); $subscriptionsTable->updateAll( ['Subscriptions.users = Subscriptions.users + 1'], ['Subscriptions.id' => $company->subscription_id] ); ``` this does not work
# Sep 9th 2019, 16:34 xavier83ar @neon1024 I use to have a loginRedirect() method, usually in UsersController, then AuthComponent login redirect is set to this method, there is the logic to dinamically redirect the user, maybe by its rol or profile
# Sep 9th 2019, 15:44 neon1024 Every time I try and use JSON it just throws in loads `\` everywhere!
# Sep 9th 2019, 15:44 neon1024 Stupid AuditStash plugin
# Sep 9th 2019, 15:38 admad dirty but simple and effective :slightly_smiling_face:
# Sep 9th 2019, 15:37 neon1024 Do I just write to the components config every time?
# Sep 9th 2019, 15:37 neon1024 What is a neat approach to managing dynamic redirect urls with the AuthComponent?
# Sep 9th 2019, 14:49 info315 @admad ok thanks
# Sep 9th 2019, 14:49 admad @info315 removing that statement is the right thing to do since the request has already been handled by the handler when you called `parent::process()`
# Sep 9th 2019, 14:43 info315 Hi, I try to port my AppAuthenticationMiddleware from cake 3.8 to the current 4.x but I stuck at this error: `substr() expects parameter 1 to be string, null given Error in: ROOT/vendor/cakephp/cakephp/src/Http/ControllerFactory.php, line 83 ` If i remove `$response = $handler->handle($request);` from my middelware the issue is gone, but i think that's not the solution
# Sep 9th 2019, 14:03 ndm You'd still have to reassign the connection after that though, or reset / remove the respective tables from the table registry. There's 1000 and 1 ways to abstract that away somewhere, the event stuff in the answer was just an example.
# Sep 9th 2019, 13:55 challgren https://api.cakephp.org/3.3/class-Cake.Datasource.ConnectionManager.html#_dropAlias
# Sep 9th 2019, 13:55 itmpls How can I revert it back to default once I alias it?
# Sep 9th 2019, 13:52 challgren @itmpls maybe https://api.cakephp.org/3.3/class-Cake.Datasource.ConnectionManager.html#_alias
# Sep 9th 2019, 13:51 itmpls Manually I can solve it with `$table->Users->setConnection()`. is there a cleaner way if I . had to do . this for 5-6 . tables?