Log message #4216966

# At Username Text
# Dec 2nd 2019, 13:58 dereuromark if that is cake4
# Dec 2nd 2019, 13:57 dereuromark prefix => Api (case sensitive)
# Dec 2nd 2019, 13:56 slackebot /Users/noeldacosta/repo/mnr-be/vendor/neomerx/json-api/src/Representation/BaseWriter.php(182): Neomerx\JsonApi\Parser\IdentifierAndResource->parseLinks(Object(CrudJsonApi\Schema\JsonApi\DynamicEntitySchema), Object(App\Model\Entity\Enquiry), 'enquiry-type', Array, true, false)``` and it seems to be routing to a view (although it shouldn't as it's the CRUD action.
# Dec 2nd 2019, 13:56 slackebot /Users/noeldacosta/repo/mnr-be/vendor/friendsofcake/crud-json-api/src/Schema/JsonApi/DynamicEntitySchema.php(309): Cake\Routing\Router::url(Array, false) #2 /Users/noeldacosta/repo/mnr-be/vendor/neomerx/json-api/src/Parser/RelationshipData/ParseRelationshipLinksTrait.php(117): CrudJsonApi\Schema\JsonApi\DynamicEntitySchema->getRelationshipSelfLink(Object(App\Model\Entity\Enquiry), 'enquiry-type') #3
# Dec 2nd 2019, 13:56 noel @ndm well the stacktrace is this: ```2019-12-02 13:53:33 Error: [Cake\Routing\Exception\MissingRouteException] A route matching "array ( 'controller' => '', 'plugin' => '', 0 => 1, '_method' => 'GET', 'action' => 'view', 'prefix' => 'api', '_ext' => NULL, )" could not be found. #0 /Users/noeldacosta/repo/mnr-be/vendor/cakephp/cakephp/src/Routing/Router.php(734): Cake\Routing\RouteCollection->match(Array, Array) #1
# Dec 2nd 2019, 13:52 alexdd55976 ` hayko/mongodb dev-master` ran into version issues
# Dec 2nd 2019, 13:52 alexdd55976 is there a mongodb plugin for cake4?
# Dec 2nd 2019, 13:40 ndm Start with checking the stracktrace to figure where exactly the problem originates (presumably a call to `Router::url()` , either explicitly or implicitly (for example via a helper)), that might give some insight on what's happening.
# Dec 2nd 2019, 13:37 slackebot 'action' => 'view',\n 'prefix' => 'api',\n '_ext' => NULL,\n)\" could not be found." } ],``` Any idea why I'm getting a 404 saying route could not be found instead of the expected JSONAPI response after successful insert?
# Dec 2nd 2019, 13:37 noel Hi guys. I'm really struggling with this one... (posted already but no reply; ever hopeful) JSONAPI is reporting the following after a POST request – note that the post request successfully inserts a record despite this error: ```"errors": [ { "status": "404", "title": "Not Found", "detail": "A route matching \"array (\n 'controller' => '',\n 'plugin' => '',\n 0 => 1,\n '_method' => 'GET',\n
# Dec 2nd 2019, 13:27 josbeir after you save an entity the id will be set for that entity
# Dec 2nd 2019, 13:24 val Hi, we have Model::getLastInsertID() in 2.x. What is the alternative in 3.x?
# Dec 2nd 2019, 13:07 dakota Caught it because we had a client complain about receiving somebody else's email in their own email!
# Dec 2nd 2019, 13:06 dakota :+1:
# Dec 2nd 2019, 12:51 challgren Thanks @dakota
# Dec 2nd 2019, 12:41 cibyjohn Hi Team
# Dec 2nd 2019, 12:38 challgren I hope these other plugins that I use will accept the PRs that will be coming
# Dec 2nd 2019, 12:37 challgren Im guessing everything message related is now in Message and Mailer is Mailer, a bit of a seperation
# Dec 2nd 2019, 12:35 dereuromark same for me with queue and others :slightly_smiling_face: mainly email related things
# Dec 2nd 2019, 12:32 challgren Ok first CakePHP 4.x plugin is converted over https://github.com/narendravaghela/cakephp-mailgun/tree/cake-4.x didn’t seem to be that much of a PITA besides the message vs email that still needs to be done
# Dec 2nd 2019, 11:34 neon1024 To the test suite!
# Dec 2nd 2019, 11:34 challgren Nadda
# Dec 2nd 2019, 11:34 neon1024 Rejiggled the query a bit
# Dec 2nd 2019, 11:34 jotpe Hey :slightly_smiling_face:
# Dec 2nd 2019, 11:34 slackebot <neon1024>
# Dec 2nd 2019, 11:33 neon1024 Noice, thanks @ndm
# Dec 2nd 2019, 11:31 neon1024 Have a look in the repo
# Dec 2nd 2019, 11:30 challgren Is there a native encrypted type in the DB for 4.x?
# Dec 2nd 2019, 11:29 ndm `where(..., [], true)`
# Dec 2nd 2019, 11:29 ndm Oh wait, I think it's missing the override flag...
# Dec 2nd 2019, 11:27 neon1024 Yeah, I was curious how I targetted a specific clause
# Dec 2nd 2019, 11:26 neon1024 Everyone does! ;)
# Dec 2nd 2019, 11:26 ndm ugh, i hate the new editor
# Dec 2nd 2019, 11:26 ndm ``` $query->where(function (QueryExpression $expression, Query $query) use ($providers) { return $query->newExpr()->or([ 'Packages.provider_id IN' => $providers, $query->clause('where') ]); }); ```
# Dec 2nd 2019, 11:26 neon1024 I’m quite shocked that it’s been deprecated with a key use-case being omitted as an alternative
# Dec 2nd 2019, 11:25 ndm Yeah, but call `orWhere` multiple times and things get really ugly really fast... just a moment
# Dec 2nd 2019, 11:25 neon1024 Whereas the `orWhere` nails it first time
# Dec 2nd 2019, 11:25 slackebot <neon1024>
# Dec 2nd 2019, 11:24 neon1024 https://book.cakephp.org/3/en/orm/query-builder.html#advanced-conditions
# Dec 2nd 2019, 11:24 neon1024 That could be clearer in the docs imho
# Dec 2nd 2019, 11:24 ndm If you expect this to merge with existing conditions, that doesn't work. You'll have to build it all at once, or explicitly merge with previous conditions.