Log message #4193142

# At Username Text
# Jul 15th 2019, 12:11 mikelthewebguy Its generating querystring as "?get-history?customerId=1andamp;isData=1"
# Jul 15th 2019, 12:10 mikelthewebguy $this->Url->build(['controller' => 'History', 'action' => 'getHistory', 'customerId' => '1', 'isData' => '1'])
# Jul 15th 2019, 12:09 mikelthewebguy If I try to build a URL with multiple querystring parameters, its not working
# Jul 15th 2019, 12:09 mikelthewebguy I am facing an issue with Url helper's build method
# Jul 15th 2019, 12:08 mikelthewebguy Hi Guys
# Jul 15th 2019, 12:05 Naino e I didn't understand how `setHost` works. Thanks.
# Jul 15th 2019, 12:05 Naino Hi! I'm trying to use `Route->setHost()` without success. I created to same routes with two different host. Those two host are different from my local host. For example I put `app.com`, `app.fr` and my local testing host is `app.local`. Well the first route that is declared is matching, whereas `app.com <> app.local`. Is that normal behavior ? Mayb
# Jul 15th 2019, 11:56 conehead Hm. Anyone got any idea how to paginate/sort by data that can not be generated via query?
# Jul 15th 2019, 11:41 conehead You're welcom
# Jul 15th 2019, 11:41 felix.robaglia not putting all data in a single view, but I need the data from 3 different tables in order to display the informations i want. ^^ Anyways, thanks a lot for your help @conehead !
# Jul 15th 2019, 11:37 conehead Although I do not know what exactly you are planning to do...I guess putting all data into a single view is never a good idea.
# Jul 15th 2019, 11:36 conehead When you created a new project have a look at the `PagesController` and the `routes.php`. It says if you basically just enter the main url, redirect to the PagesController with the action index
# Jul 15th 2019, 11:35 conehead Yes right. You always need one controller that gathers all the data you need and you will (probably, not always) need one view to display all your data
# Jul 15th 2019, 11:32 felix.robaglia Okay thanks, this helps a lot. But then I still need one 'parent' controller having an index() function retrieving all the data i need from tables, right ?
# Jul 15th 2019, 11:30 conehead you have to differentiate between tables and controllers. A controller can access several tables and then passes the data to one single view
# Jul 15th 2019, 11:29 conehead 2 possible ways: either you create several controllers and load the data via ajax/json after the main page has loaded or your controller loads other models and sets it's data. ``` $this->loadModel('Users'); $this->loadModel('Comments'); $this->set([ 'users' => $this->Users->find(), 'comments' => $this->Comments->find(), ]); ```
# Jul 15th 2019, 11:24 felix.robaglia But if my app is just a onepage using data from many tables, how should I proceed then ?
# Jul 15th 2019, 11:21 conehead @felix.robaglia Why would you want to do that? One controller(action) should be responsible for one view
# Jul 15th 2019, 11:19 felix.robaglia Hello, what is the best way to create a view that uses variables set from multiple controllers ?
# Jul 15th 2019, 11:09 lubos Yes it has hasMany association, it might be it. Thanks I'll check the debug kit sql log
# Jul 15th 2019, 10:42 neon1024 Check the DebugKit SQL log
# Jul 15th 2019, 10:42 neon1024 Does the entity you’re saving have a hasMany association? You might find there is a transaction here and more than one query is being executed
# Jul 15th 2019, 10:41 neon1024 Might be different events
# Jul 15th 2019, 10:38 lubos Well can't find any another event, trying to catch it by object name. See screenshot, this is particular case where left hand side code is contorlller, right hand side listener. The left debug part is showing 1st dirty fields in controller, 2nd dirty fields at the listener
# Jul 15th 2019, 10:33 neon1024 Perhaps I’m thinking of formatResults
# Jul 15th 2019, 10:33 neon1024 Isn’t this what map() and reduce() are for? Or am I thinking of another event
# Jul 15th 2019, 10:33 neon1024 Perhaps the event priority is lower than another afterSave and that is changing your data
# Jul 15th 2019, 10:31 lubos The problem that dirty is saying too many properties have changed => more dirty fields than I expect and part of code where I am using `isDirty` is wrong because of that
# Jul 15th 2019, 10:30 neon1024 Could it be that properties in the associated entities have not changed, so will not be saved?
# Jul 15th 2019, 10:29 neon1024 Perhaps change to `Log::debug()` instead of dumping
# Jul 15th 2019, 10:29 neon1024 Are you calling exit?
# Jul 15th 2019, 10:29 lubos in the controller where this the model -> save which fires this particular `Model.afterSave` I debug entity and dirty fields are just fine before save action
# Jul 15th 2019, 10:27 lubos Morning all in the listener I am listening to the `Model.afterSave` and trying to debug particular entity. I can see there are too many dirty fields (saving less for the action) but for got sake I can't find reason why (can't see any more model -> save in the app). Any hint how to debug dirty fields?
# Jul 15th 2019, 10:13 neothermic you been sword fighting again? :P
# Jul 15th 2019, 08:49 challgren The scar is horse shoe shaped the whole knuckle pretty much
# Jul 15th 2019, 08:48 neon1024 About the feeling, and perhaps the scar too
# Jul 15th 2019, 08:48 neon1024 That’s good news :slightly_smiling_face:
# Jul 15th 2019, 08:48 challgren Ahh good, got feeling back a couple weeks ago, nice big ol scar on it
# Jul 15th 2019, 08:48 neon1024 Hey @challgren! How’s the hand these days?
# Jul 15th 2019, 08:47 matt Great - thanks for the advice
# Jul 15th 2019, 08:47 challgren Thats what I was gonna say have different validation sets