Log message #4150617

# At Username Text
# Jun 12th 2018, 15:52 neon1024 @jeremyharris I ask because of this line -> https://github.com/UseMuffin/Webservice/blob/dev/config/bootstrap.php which uses the deprecated endpoint registry.
# Jun 12th 2018, 15:52 josbeir (elasticsearch, basically the same...)
# Jun 12th 2018, 15:52 jeremyharris should be fine for entity contexts though
# Jun 12th 2018, 15:52 jeremyharris @josbeir there’s a known issue for modelless forms if that’s what you’re using
# Jun 12th 2018, 15:51 jeremyharris unless it bails early at 103
# Jun 12th 2018, 15:51 josbeir hmm, is the formhelper incompatible with nested validation rules?
# Jun 12th 2018, 15:50 jeremyharris it is possible? how so? shouldn’t you get PHP errors when it tries to use it as an array key on L106?
# Jun 12th 2018, 15:48 neon1024 Can anyone explain to me how it is possible to pass an array as `$modelType` here, but it’s not type hinted as such? https://github.com/cakephp/cakephp/blob/de7ebdb88e11c4283185ba33c827151f02352b4b/src/Datasource/ModelAwareTrait.php#L87
# Jun 12th 2018, 15:23 LubosR yep, that was it! thanks for your help josbeir!
# Jun 12th 2018, 15:21 LubosR but looks like there is typo, i see header X-CSRFToken without - ... let me test
# Jun 12th 2018, 15:21 LubosR josbeir from the CsfrComponent and using latest cake 3.6 :)
# Jun 12th 2018, 15:15 jeremyharris morning! :coffee:
# Jun 12th 2018, 15:15 neon1024 Morning @jeremyharris
# Jun 12th 2018, 14:58 loginews thanks will read the docs
# Jun 12th 2018, 14:57 jeremyharris see: https://book.cakephp.org/3.0/en/development/routing.html#generating-urls
# Jun 12th 2018, 14:57 loginews okay! so dark and yet so clear !
# Jun 12th 2018, 14:56 jeremyharris you likely want [‘action’ => ‘index’, ‘?’ => [‘q’ => ‘NNNNNN’]]
# Jun 12th 2018, 14:56 jeremyharris it is inflecting the action key, because it expects it to be an action
# Jun 12th 2018, 14:55 loginews File uploaded https://cakesf.slack.com/files/U435V89H8/FB70S0YTY/strange_character_loss.sh / https://slack-files.com/T053DPNCM-FB70S0YTY-154ec2fd8b - Why is N converted to -n ???
# Jun 12th 2018, 14:17 josbeir also: what cake version are you using? ;)
# Jun 12th 2018, 14:16 josbeir they both check the header tho... sure the 'X-CSRF-Token' header is present with the token ?
# Jun 12th 2018, 14:16 josbeir is it from the CsrfComponent or middleware?
# Jun 12th 2018, 14:16 josbeir LubosR: did you check where the exception is thrown
# Jun 12th 2018, 14:14 admad and the loadModel() call remains same
# Jun 12th 2018, 14:14 neon1024 Thanks
# Jun 12th 2018, 14:14 admad @neon1024 `$this->modelFactory('Table', [new EndpointLocator(), 'get']);` should do it
# Jun 12th 2018, 14:10 admad ok, gtg, ttyl
# Jun 12th 2018, 14:09 neon1024 @admad Okay, I will submit a pull request to update the readme
# Jun 12th 2018, 14:09 LubosR I can see csfrToken is in request header cookie too
# Jun 12th 2018, 14:09 admad you just need to change the line `$this->modelFactory('Endpoint', ['Muffin\Webservice\Model\EndpointRegistry', 'get']);` to use the new locator instead of EndpointRegisry
# Jun 12th 2018, 14:07 neon1024 Ok
# Jun 12th 2018, 14:07 admad @neon1024 checkout the Controller::loadModel() code
# Jun 12th 2018, 14:07 LubosR josebeir I have noticed that there is no Csfr at Application.php
# Jun 12th 2018, 14:07 admad no, you can configure the locator to use for specific model types
# Jun 12th 2018, 14:07 LubosR admad, josbeir... i am sending now X-CSRFToken header in XMLHttpRequest, but still getting CSFR token mistmatch exception, any more ideas what I am doing wrong?
# Jun 12th 2018, 14:06 neon1024 I will try and find some time to test out the RC :slightly_smiling_face:
# Jun 12th 2018, 14:06 neon1024 Yeah, but `loadModel` relies on the Registry doesn’t it? Which has been deprecated
# Jun 12th 2018, 14:05 neon1024 Woah, look how much code marlinc has contributed! :O
# Jun 12th 2018, 14:05 admad hmm actually one should still be able to use ->loadModel()
# Jun 12th 2018, 14:04 neon1024 :thumbsup:
# Jun 12th 2018, 14:04 admad looks fine