Log message #4221053

# At Username Text
# Jan 6th 2020, 15:49 gianmarxgagliardi ```$matchHome = $this->Matches->get($id, [             'contain' => ['SeasonReferees','SeasonReferees.Referees', 'ClubsHome', 'MatchPlayers','MatchPlayers.SeasonPlayers','MatchPlayers.SeasonPlayers.Players'],         ]);                  $query = $matchHome->find();         $query->matching('MatchPlayers.SeasonPlayers', function ($q) {             return
# Jan 6th 2020, 15:49 gianmarxgagliardi I'm trying to get his players selected for a team that just gives me a mistake: `Call to undefined method App\Model\Entity\Match::find()`
# Jan 6th 2020, 15:49 luizcmarin I have some views created on mysql. Can I use them the same way as a normal table in cake?
# Jan 6th 2020, 15:41 etibor interestingly in the '[original]' array its shows the request->getData('visible') value the issue is that is not saved
# Jan 6th 2020, 15:37 etibor i dont understand why this not working in edit function but in add working fine
# Jan 6th 2020, 15:33 etibor thats why i havent post the request->getData content
# Jan 6th 2020, 15:32 etibor @ndm well i would like to use this : $tst->_joinData->visible = $this->request->getData('visible');
# Jan 6th 2020, 15:32 ndm Could be all sorts of things... Maybe something changes the layout at `beforeRender`
# Jan 6th 2020, 15:31 alexdd55976 any idea what could possibly interfer with that?
# Jan 6th 2020, 15:31 ndm No
# Jan 6th 2020, 15:30 alexdd55976 not really?
# Jan 6th 2020, 15:30 alexdd55976 do i have to add a helper here?
# Jan 6th 2020, 15:30 ndm @alexdd55976 Work's fine for me
# Jan 6th 2020, 15:30 gianmarxgagliardi even if late good year
# Jan 6th 2020, 15:28 alexdd55976 works fine in 3.x so its kind of confusing
# Jan 6th 2020, 15:28 ricksaccous I haven't used cake4 yet just curious
# Jan 6th 2020, 15:28 alexdd55976 yes
# Jan 6th 2020, 15:28 ricksaccous you're doing that from a controller action?
# Jan 6th 2020, 15:25 alexdd55976 can anyone confirm that `$this->viewBuilder()->setLayout('ajax');`works in cake4? can not make it happen.. whysoever
# Jan 6th 2020, 15:23 johnpaul5421 I think the problem is the Controller and Action method is not receiving the Posted form data at all, not sure if i'm doing it correctly, Any Examples or Pointers? much appreciated.
# Jan 6th 2020, 15:22 johnpaul5421 Thanks, if anyone can provide some Form Help or examples for Passing data from a Controller to a View class. Just a Simple Form 1 variable or a Checklist array.
# Jan 6th 2020, 15:20 johnpaul5421 receiving it in an example action = add in controller = shoppingListsController, using if ($this->request->is('post')), set compact, flashing the error.
# Jan 6th 2020, 15:19 ndm @etibor That's only half of the output, request data debug is missing
# Jan 6th 2020, 15:19 johnpaul5421 Anyone can provide a simple example of Posting a form from a view class passing data from the View to the Controller, using $this->Form->create and $this->Form->control, $this->Form->hidden and $this-Form-end();
# Jan 6th 2020, 15:16 johnpaul5421 i'm trying to keep it simple using $this->request->is('post')); or I may try ajax.
# Jan 6th 2020, 15:15 etibor and the issue is with the visible field
# Jan 6th 2020, 15:14 johnpaul5421 can anyone provide a simple example of a post form passing data from View class to a Controller, grabbing maybe a checklist Array.
# Jan 6th 2020, 15:13 etibor @ndm here is the debug output : https://pastebin.com/vJE3GZy3
# Jan 6th 2020, 15:12 johnpaul5421 i'm not to sure, I know you can pass hidden values, $this->Form->hidden('variable',['value'=>'variable']);
# Jan 6th 2020, 15:10 neon1024 Perhaps the form isn’t posting? I seem to recall there being a `METHOD` hidden input
# Jan 6th 2020, 15:09 johnpaul5421 <?php echo $this->Form->create(false, array('url'=>array('controller'=> 'shoppingLists', 'action' => 'add'))); ?>
# Jan 6th 2020, 15:07 johnpaul5421 ($this->request->is('post')) in the controller for the method add, but I don't see it going to this method at all.
# Jan 6th 2020, 15:05 admad That's not a bad thing :)
# Jan 6th 2020, 15:05 neon1024 :thinking_face: I forget the code in 2.x
# Jan 6th 2020, 15:04 neon1024 Are you trying `$this->request->data` ?
# Jan 6th 2020, 15:02 johnpaul5421 Working with Cakephp 2X i'm trying to pass data from a form $form->create('tutor', array(action'=>
# Jan 6th 2020, 14:56 etibor okey moment, thank you
# Jan 6th 2020, 14:56 ndm @etibor Again, please show the debug output
# Jan 6th 2020, 14:55 alexdd55976 i really don't wanna put that into the template
# Jan 6th 2020, 14:54 alexdd55976 hey guys, ideas why ` ```$this->viewBuilder()->setLayout('ajax.php');``` not working?
# Jan 6th 2020, 14:39 ondrej.nedvidek ok I think I found it ```$this->Crud->on('beforeFind', function(\Cake\Event\Event $event) use ($slug) { $event->getSubject()->query->find('view', compact('slug')); });```