Log message #4186365

# At Username Text
# May 15th 2019, 11:12 Mikeynl anu suggestion, have cakepdf installed, see in RequestHandlerComponent that viewClassMap -> "pdf" => "CakePdf.Pdf" is registered, but have feeling doesnt render at all
# May 15th 2019, 11:07 neothermic @dereuromark the super hacky way is to convert it back to JSON and back out to an array with the second param of json_decode :P
# May 15th 2019, 10:51 dereuromark If I return a Json response from a collection (index), the items are not toArray() but actual objects in the json. Is there a good way to make them pure arrays?
# May 15th 2019, 10:21 kiwi_45 Thanks very much, looks a good method
# May 15th 2019, 10:19 dereuromark The 4.x branch should also work afaik.
# May 15th 2019, 10:18 dereuromark I recommend using such a component approach instead of island things and inconsistent checking all over the code.
# May 15th 2019, 10:18 dereuromark I use https://github.com/dereuromark/cakephp-tools/blob/master/src/Controller/Component/CommonComponent.php#L23 to fix up the incoming data for trim requirement.
# May 15th 2019, 10:16 kiwi_45 What's the recommended way of modifying POST data in CakePHP 4?
# May 15th 2019, 10:16 kiwi_45 $this->request->data['username'] = trim($this->request->getData('username'));
# May 15th 2019, 10:16 kiwi_45 I'd like to modify request data directly, but my approach (below) is deprecated:
# May 15th 2019, 09:24 np Hello - /users/login via app ```{ "message": "Missing CSRF token cookie", "url": "/users/login", "code": 403, "file": "/app/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php", "line": 196 }``` How to fix?
# May 15th 2019, 08:08 neon1024 Morning all :wave:
# May 15th 2019, 07:47 cosmin.cimpoi @marcusgoede Cake should do all this for you. I would guess it s something in configs, maybe localization
# May 15th 2019, 07:32 marcusgoede Hi everybody, I’ve installed CRUD for a new CakePHP app. It works basically fine, but I have one problem: Crud view automatically creates datetime pickers for datetime fields. When I submit the datetime format is wrong: *Invalid datetime format: 1292 Incorrect datetime value: ‘16.05.2019 00:00’* Is there a way to change submitted datetime values to be compatible for the database?
# May 15th 2019, 06:44 Mikeynl someone has some time to help me to debug routes ? I installed Cakepdf plugin, but the view render is not working. Spitting out plain html
# May 15th 2019, 02:54 waspinator does patchEntity take `_joinData` into considerations when processing `belongsToMany` data? I want to add two relationships with the same `foreignKey` and `targetForeignKey`, but with different `_joinData`
# May 14th 2019, 20:21 jeremyharris FrozenTime has the same trait so it gets the comparison methods too
# May 14th 2019, 20:20 jeremyharris It’s actually on the ComparisonTrait (in the chronos lib) which is used by MutableDateTime in Chronos which is what the Time class in cake uses
# May 14th 2019, 19:44 mehov Hi everyone, where does a Cake\I18n\FrozenTime instance get the `isPast()` method from? I can see it's declared in [Cake\View\Helper\TimeHelper](https://api.cakephp.org/3.0/class-Cake.View.Helper.TimeHelper.html), but [Cake\I18n\FrozenTime](https://api.cakephp.org/3.5/class-Cake.I18n.FrozenTime.html) doesn't seem to have any connection to it
# May 14th 2019, 18:40 maymeow ```
# May 14th 2019, 18:39 ricksaccous i don't know very much about postgres
# May 14th 2019, 18:38 maymeow `operator does not exist: integer = character varying LINE 1:` maybe it have to do something with this
# May 14th 2019, 18:33 maymeow already cloned project back to pc from git
# May 14th 2019, 18:33 ricksaccous :(
# May 14th 2019, 18:33 ricksaccous oh
# May 14th 2019, 18:33 maymeow no
# May 14th 2019, 18:32 ricksaccous bin/cake schema_cache clear ;)
# May 14th 2019, 18:32 ricksaccous did you recently change a field?
# May 14th 2019, 18:32 ricksaccous @maymeow maybe it was the cake schema cache?
# May 14th 2019, 18:29 slackebot operator does not exist: integer = character varying LINE 1: ...EFT JOIN "cake_php_users" "Users" ON "Users"."id" = ("Secret... ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts. ``` i have set `quotedIdentifiers = true` but its not working any idea what with this? Unitl i reinstalled pc it worked
# May 14th 2019, 18:29 slackebot "Users"."password" AS "Users__password", "Users"."created" AS "Users__created", "Users"."modified" AS "Users__modified", "Users"."api_key" AS "Users__api_key", "Users"."api_key_plain" AS "Users__api_key_plain", "Users"."role_id" AS "Users__role_id" FROM "cake_php_secrets" "Secrets" LEFT JOIN "cake_php_users" "Users" ON "Users"."id" = ("Secrets"."user_id") LIMIT 20 OFFSET 0 ``` returns this error ``` Error: SQLSTATE[42883]: Undefined function: 7 ERROR:
# May 14th 2019, 18:29 maymeow i have problem with postgres 11.3 on ubuntu Following select ``` SELECT "Secrets"."id" AS "Secrets__id", "Secrets"."user_id" AS "Secrets__user_id", "Secrets"."private_key" AS "Secrets__private_key", "Secrets"."public_key" AS "Secrets__public_key", "Secrets"."aes_key" AS "Secrets__aes_key", "Secrets"."default" AS "Secrets__default", "Secrets"."created" AS "Secrets__created", "Users"."id" AS "Users__id", "Users"."email" AS "Users__email",
# May 14th 2019, 16:10 shupel16 lol
# May 14th 2019, 16:03 admad @neon1024 what since have to done to deserve this?
# May 14th 2019, 16:02 neon1024 Ruh roh
# May 14th 2019, 16:02 admad explicitly loading a plugin isn't necessary in this case, composer's autoloader takes care of loading the class
# May 14th 2019, 16:02 neon1024 At least your problem is nice! I’m debugging javascript in Internet Explorer 11 :(
# May 14th 2019, 16:01 georgec yup
# May 14th 2019, 16:01 neon1024 As long as it’s in your `require` it’ll be added to the autoloader :slightly_smiling_face:
# May 14th 2019, 16:00 georgec I run `composer dump-autoload` with and without `-o` flag, but it still works.
# May 14th 2019, 15:58 neon1024 Well, good to know :thumbsup: