# |
Dec 19th 2019, 15:10 |
neon1024 |
Or your php-fpm logs, if you’re using php-fpm |
# |
Dec 19th 2019, 15:10 |
neon1024 |
Did you check your web server logs? |
# |
Dec 19th 2019, 15:02 |
em |
I just migrated to 4.0.0, i have error reporting enabled, debug is on as well. But there are no errors are shown on screen, error logs are empty as well. I’m getting whitescreen. Does anyone had such issue ? |
# |
Dec 19th 2019, 14:38 |
damiano |
thanks |
# |
Dec 19th 2019, 14:38 |
damiano |
awesome |
# |
Dec 19th 2019, 14:37 |
kaliel |
$this->viewBuilder()->disableAutoLayout() |
# |
Dec 19th 2019, 14:37 |
damiano |
opk |
# |
Dec 19th 2019, 14:37 |
damiano |
yeah i am using the ErrorController |
# |
Dec 19th 2019, 14:37 |
kaliel |
if you want to disable layout from controller u have to use viewbuilder |
# |
Dec 19th 2019, 14:37 |
damiano |
or in the error500.ctp file ? |
# |
Dec 19th 2019, 14:36 |
damiano |
do you mean in the controller action right? |
# |
Dec 19th 2019, 14:36 |
kaliel |
in view |
# |
Dec 19th 2019, 14:36 |
kaliel |
@damiano ```$this->disableAutoLayout();``` |
# |
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 |