Log message #4219540

# At Username Text
# Dec 19th 2019, 14:35 damiano or do i need to create something like error.ctp (layout) and just write <?php echo $this->fetch('content'); ?> ?
# Dec 19th 2019, 14:34 damiano i need to customize the error 404 and error500
# Dec 19th 2019, 14:34 damiano hello is is possible to just call the rendering of a view without using a layout?
# Dec 19th 2019, 14:25 challgren It should almost be `if (is_array($url) andand array_key_exists($key, $url) andand !preg_match('#^' . $pattern . '$#u', $url[$key])) `
# Dec 19th 2019, 14:08 kaliel line 711
# Dec 19th 2019, 14:08 kaliel it's in ```Cake\Routing\Route\Route```
# Dec 19th 2019, 14:07 kaliel can someone tells me why in this logic operator, the second statement is evaluated whiole the first is evaluate to false : ```if (isset($url[$key]) andand !preg_match('#^' . $pattern . '$#u', $url[$key])) ```
# Dec 19th 2019, 13:43 jimbo2150 @maymeow Actually both should be done - a js function to detect when 'club_home_id' is updated and disable the option with the same value in 'club_visitor_id' and double-check in the validation code on the server to ensure a mistake or dev-tools trick was not used to override.
# Dec 19th 2019, 13:42 gianmarxgagliardi i think the js function is the best solution. I prefer that the user is channeled so that he can make as few mistakes as possible
# Dec 19th 2019, 13:41 maymeow @gianmarxgagliardi or you can compare ids of both clubs after post but this is not preventing user to select same team in both selects (just return error message that teams must be different)
# Dec 19th 2019, 13:40 jotpe a js function that would select the entry from the generated <select> options and remove/disable it.
# Dec 19th 2019, 13:39 jotpe Another approach would be to have a 'nested' model. So that each of your club home has a sub array with the visitor clubs.
# Dec 19th 2019, 13:39 gianmarxgagliardi a js function that takes me from a $clubsUnmated team?^
# Dec 19th 2019, 13:38 jotpe Then I would go for a javascript solution. You could Remove the entry based on the selected one.
# Dec 19th 2019, 13:37 gianmarxgagliardi @jotpe yes
# Dec 19th 2019, 13:36 jotpe @gianmarxgagliardi So the Entries shown (Club Visitor) are dependent on the previous Selection (Club Home)?
# Dec 19th 2019, 13:35 jimbo2150 @challgren got it
# Dec 19th 2019, 13:35 gianmarxgagliardi ```echo $this->Form->control('season');             echo $this->Form->control('referee_id', ['options' => $refereesUnmated]);             echo $this->Form->control('club_home_id', ['options' => $clubsUnmated]);             echo $this->Form->control('club_visitor_id', ['options' => $clubsUnmated]);```
# Dec 19th 2019, 13:34 gianmarxgagliardi an extract of add.ctp
# Dec 19th 2019, 13:34 slackebot //$clubs = $this->Matchs->Clubs->find('list', ['limit' => 200]);         $clubsUnmated=$this->Matchs->Clubs->find('list',['keyField' => 'id',         'valueField' =>['nome_societa']]);         $this->set(compact('match', 'refereesUnmated', 'clubsUnmated'));     }```
# Dec 19th 2019, 13:34 slackebot $this->redirect(['action' => 'index']);             }             $this->Flash->error(__('The match could not be saved. Please, try again.'));         }         $refereesUnmated=$this->Matchs->Referees->find('list',['keyField' => 'id',         'valueField' =>function($referee){             return $referee->cognome .' '. $referee->nome;         }]);        
# Dec 19th 2019, 13:34 gianmarxgagliardi ```public function add()     {         $match = $this->Matchs->newEntity();         if ($this->request->is('post')) {             $match = $this->Matchs->patchEntity($match, $this->request->getData());             if ($this->Matchs->save($match)) {                 $this->Flash->success(__('The match has been saved.'));                 return
# Dec 19th 2019, 13:33 gianmarxgagliardi I should make a form to match the matches of the teams. How do I prevent a team from playing against itself
# Dec 19th 2019, 13:24 challgren No he means you can’t filter by for example authentication related plugins.
# Dec 19th 2019, 13:16 jimbo2150 You can always contact the developers of said plugins/libraries and ask them to push to Composer ;)
# Dec 19th 2019, 13:03 dereuromark composer is missing some useful cake specific grouping/filtering, though IMO
# Dec 19th 2019, 12:48 jimbo2150 Composer pretty much took over for the CakePHP plugins directory - https://packagist.org/?query=cakephp
# Dec 19th 2019, 10:50 kiwi_8 yo
# Dec 19th 2019, 10:48 gianmarxgagliardi morning
# Dec 19th 2019, 10:32 dereuromark sure, the mind reading plugin
# Dec 19th 2019, 10:16 challgren No plugin to do all that??? :P
# Dec 19th 2019, 10:13 dereuromark tags, filtering and few other useful meta things are nice to have. just a bit sad no one took better ownership here
# Dec 19th 2019, 10:12 dereuromark well, in a way, but you cannot fully replace a DB driven approach with a static list
# Dec 19th 2019, 10:12 challgren Thats what I though, I thought fox/awesome replaced it
# Dec 19th 2019, 10:10 dereuromark i dont think so, for years
# Dec 19th 2019, 09:49 challgren Is https://plugins.cakephp.org/ still maintained?
# Dec 19th 2019, 09:08 kaliel morning all :croissant:
# Dec 19th 2019, 08:50 alexdd55976 and duderinas
# Dec 19th 2019, 08:50 alexdd55976 morning dudes
# Dec 19th 2019, 08:32 kani `<?php` `use Cake\Routing\RouteBuilder;` `use Cake\Routing\Router;` `use Cake\Routing\Route\DashedRoute;` `Router::plugin(`     `'Api',`     `['path' => '/api'],`     `function (RouteBuilder $routes) {`         `$routes->fallbacks(DashedRoute::class);`         `$routes->setExtensions(['json']);`         `$routes->resources("Posts");`     `}` `);`
# Dec 19th 2019, 08:19 kani v4 not loading plugin route