Log message #4204065

# At Username Text
# Sep 19th 2019, 06:04 admad no it wont
# Sep 19th 2019, 06:03 admad the `$user` entity passed as 1st argument already has the id
# Sep 19th 2019, 06:03 adam282 So the form I submit would need the `id` as a hidden field? I don’t like that.
# Sep 19th 2019, 06:03 hmic adam282: zou provide it with an entity to patch, this has all the information needed!
# Sep 19th 2019, 06:02 adam282 How does `$user = $this->Users->patchEntity($user, $this->request->getData());` know which row to update? In CakePHP 2.x I was able to do `$this->User->id = $id;` and then `$this->User->save($this->request->data)` and it would update the row based on the `id` set. How do I do this in CakePHP 3.8?
# Sep 19th 2019, 05:38 adam282 Please understand, the link you’re referencing that is already created is not coming from the query. They are creating it in the view (.ctp) file.
# Sep 19th 2019, 05:37 Fastidius cool cool, will do...i did plan on doing it but so far have been able to figure most of their glitches out with a little prompting...practical time i guess, CHEERS for your help 8)
# Sep 19th 2019, 05:35 admad Fastidius: i suggest you first do the blog / cms tutorial for the cake version your app is using to understand the basics
# Sep 19th 2019, 05:33 adam282 Why they gotta change shit that was working? LoL
# Sep 19th 2019, 05:33 admad @adam282 make sure you are using correct placeholders http://www.icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details
# Sep 19th 2019, 05:32 Fastidius mostly got my head around it but the source of the data is a bit vague
# Sep 19th 2019, 05:32 adam282 Your controller function is loading a template file which is being parsed and returned as the view. In that view/template will be what you’re looking for unless whoever wrote the app decided to put HTML in the controller before they returned the data from the database query, which is not intelligent.
# Sep 19th 2019, 05:31 adam282 Have you looked at the view for that page? Do you understand how CakePHP is put together with Controllers, Models, Views, Entity, etc?
# Sep 19th 2019, 05:31 Fastidius fair enough but i have a similar page with the links so in theory its there but I cant even see where its selecting fields to see what options i can have
# Sep 19th 2019, 05:29 adam282 You would need to make it a link within the view
# Sep 19th 2019, 05:29 adam282 SQL queries do not return links unless that’s what is in the database table column.
# Sep 19th 2019, 05:29 Fastidius basically the first field it returns is a string but i want it to be a link....i have the same thing on another page its just a UI inconsitency but i cant locate the bits in controlers
# Sep 19th 2019, 05:28 adam282 Ah, so in this case `paginate` is executing the query
# Sep 19th 2019, 05:28 Fastidius thats the index i want to change
# Sep 19th 2019, 05:28 Fastidius https://pastebin.com/9qPZ9Pwf
# Sep 19th 2019, 05:27 adam282 Sure
# Sep 19th 2019, 05:27 Fastidius preffered snippit place? pastebin?
# Sep 19th 2019, 05:26 adam282 Possibly…
# Sep 19th 2019, 05:26 Fastidius would a code snippet help identify?
# Sep 19th 2019, 05:26 adam282 Generally, there would be a `find` statement in the function that builds the view. They might have used queryBuilder as well or even wrote the queries manually.
# Sep 19th 2019, 05:25 adam282 Depends on how the built the queries.
# Sep 19th 2019, 05:25 Fastidius Inherited a cakephp project and I am figuring it all out mostly but i seem to be missing a fundamental if someone can explain or point me at what im missing. Mysql select allows me to put in what fields etc so i can tailor my view to what i want to see....to do this in cake is actually done where?
# Sep 19th 2019, 05:23 slackebot <adam282>
# Sep 19th 2019, 05:22 admad define "does not work"
# Sep 19th 2019, 05:17 adam282 Hm, so this does not work in `3.8`? ``` <?php echo $this->Time->format($user->created, 'M jS, Y g:iA'); ?> ```
# Sep 19th 2019, 05:10 javier.villanueva morning all
# Sep 19th 2019, 02:24 itmpls n/m, probably `SqlServer` -> `Sqlserver`
# Sep 19th 2019, 02:23 itmpls oh
# Sep 19th 2019, 02:23 itmpls anyone know why `Database driver Cake\Database\Driver\SqlServer could not be found` is thrown even though the class clearly exists? Also, sqlsrv is installed and is in_array of `PDO::getAvailableDrivers()` but enabled doesn't get called bc it doesn't reach the class
# Sep 18th 2019, 22:10 noel Nvm.. it must be late.. my eyes deceive me.
# Sep 18th 2019, 22:05 daniel.upshaw Thank you for your input and help :slightly_smiling_face:
# Sep 18th 2019, 22:04 noel The GET seems to work if I use an Accept header of `application/json` instead of the recommended `application/vnd.api+json` (which doesn't work, I get HTML back instead of json).
# Sep 18th 2019, 22:01 noel I'm trying to get CrudJsonApi working. I can get data using a request URL ending in .json. E.g. `http://crud-test:8888/cocktails/1.json`, however it also says that I should be able to make that request without the `.json` if using the correct headers but I can't seem to get that to work. Also it says that specific validation errors will be shown but it's telling me there are validation errors without specifics. Any clues?
# Sep 18th 2019, 21:47 daniel.upshaw I think it must not use fallbacks at all, for this case
# Sep 18th 2019, 21:46 daniel.upshaw Yeah, it seems like I'll just need to be specific with the routes, instead of leveraging fallbacks
# Sep 18th 2019, 21:46 dereuromark then instead of fallback set a custom route for /login inside. and you have your URL