# |
Dec 4th 2019, 08:29 |
steinkel |
@nuzulfikrie we opted to provide support for new auth plugins + 4.x and keep AuthComponent for 3.x |
# |
Dec 4th 2019, 07:00 |
javier.villanueva |
morning all |
# |
Dec 4th 2019, 05:10 |
challgren |
@nuzulfikrie is there a branch support for 3.8 and authentication? |
# |
Dec 4th 2019, 04:20 |
challgren |
Yeah I think everyone is going 4.x |
# |
Dec 4th 2019, 04:02 |
nuzulfikrie |
Thanks @challgren. Closer look on Github, seems that the Doc is for 4.x, But code i got is 3.x |
# |
Dec 4th 2019, 01:29 |
challgren |
You need to use the 9.next branch of CakeDC users I think but that supports CakePHP 4.x |
# |
Dec 4th 2019, 01:23 |
nuzulfikrie |
Hi, to integrate CakeDC users and cakephp\authentication . Do i need to load both plugins in Application.php? because in cakedc auth , authentication is not listed as plugin |
# |
Dec 3rd 2019, 20:59 |
challgren |
Haha |
# |
Dec 3rd 2019, 20:59 |
ricksaccous |
lol |
# |
Dec 3rd 2019, 20:58 |
ricksaccous |
@challgren awesome, it's good to know that we are on the same page, it reinforces that my idea is good and I'm a genious |
# |
Dec 3rd 2019, 20:56 |
challgren |
Actually I do have one example but its as you said. I create a job with a reference and the notBefore is 5 minutes from the time the jobs created. Then if the user edits the audit between now and 5 minutes it resets the notBefore. Then eventually timesout and sends the quote to the customer |
# |
Dec 3rd 2019, 20:45 |
challgren |
Yep thats what I would do |
# |
Dec 3rd 2019, 20:39 |
ricksaccous |
i suppose i'd have to create a job with a reference field and keep updating the notBefore date as necessary |
# |
Dec 3rd 2019, 20:39 |
ricksaccous |
was thinking of that, i'm using dereuromark queue right now |
# |
Dec 3rd 2019, 20:36 |
challgren |
You'd probably need a queue for that |
# |
Dec 3rd 2019, 20:32 |
ricksaccous |
has anyone created an event in cakephp to the likening of "after 30 seconds of inactivity run x"? |
# |
Dec 3rd 2019, 20:26 |
ricksaccous |
@shifat.it read this a lot https://book.cakephp.org/3/en/orm/query-builder.html |
# |
Dec 3rd 2019, 19:10 |
brian.french |
Yeah, that's basically what I ended up doing. |
# |
Dec 3rd 2019, 16:43 |
noel |
OMG.. the relief. It's like 2 days of constipation finally over :man-facepalming: and in the end was PEBKAC as usual. |
# |
Dec 3rd 2019, 16:40 |
noel |
Turns out I hadn't added the model's table class definition. Is it expected to receive 404 error when there's a class missing? |
# |
Dec 3rd 2019, 16:39 |
shifat.it |
https://pastebin.com/135UPfpG |
# |
Dec 3rd 2019, 16:39 |
shifat.it |
how to convert this in association |
# |
Dec 3rd 2019, 16:27 |
noel |
Seems that was a red-herring anyhow because either side of that logic split I still get a malformed URL :thinking_face: |
# |
Dec 3rd 2019, 16:18 |
noel |
It's false by default and in my case it is throwing an error because for some unknown reason it is producing a URL without a controller or action set. I thought it might be this problem: https://crud-json-api.readthedocs.io/en/latest/additional-information/common-issues.html#missing-routes ... but I've added all my models into the routes and it's still happening. So I'm stumped. Have been for 2 days now. |
# |
Dec 3rd 2019, 16:16 |
noel |
It's clear that it's used in generating those links but it seems to be a switch, which writes them one way if enabled and another if not and the difference is neither clear nor documented: https://github.com/FriendsOfCake/crud-json-api/blob/382907f1d9cca4fe23fc9113d93bb9ea45037806/src/Schema/JsonApi/DynamicEntitySchema.php#L285 |
# |
Dec 3rd 2019, 16:15 |
noel |
Yes it does, of course... but the question is what precisely has it to do with them :slightly_smiling_face: |
# |
Dec 3rd 2019, 16:15 |
josbeir |
=> https://jsonapi.org/format/#document-resource-object-related-resource-links |
# |
Dec 3rd 2019, 16:15 |
josbeir |
i'm guessing it has to do with related content links in json:api |
# |
Dec 3rd 2019, 16:13 |
noel |
@josbeir Thanks. I have read the spec, however that string `_jsonApiBelongsToLinks` does not appear in the spec. In the CRUD implementation it splits the logic based on that setting but it's not clear why nor what it's doing – the code has no related comments and nor do the docs. |
# |
Dec 3rd 2019, 16:05 |
sohnyrin |
That was it, headers problem gone :) |
# |
Dec 3rd 2019, 16:00 |
sohnyrin |
ok thanks, the warning must be the problem then |
# |
Dec 3rd 2019, 16:00 |
sohnyrin |
ohhh |
# |
Dec 3rd 2019, 16:00 |
ricksaccous |
generally whenever i get the headers have already been sent message that means there is an error on that action/ a deprecation warning of some sort/etc |
# |
Dec 3rd 2019, 16:00 |
sohnyrin |
Yes my entity is called "Evaluations" my method is "Analysis" and I call /Evaluations/Analysis in the url |
# |
Dec 3rd 2019, 15:59 |
ricksaccous |
@sohnyrin are you putting this in a controller action? |
# |
Dec 3rd 2019, 15:57 |
sohnyrin |
Hi ! :slightly_smiling_face: I'm using a php script that calls php-curl on my cake app but I get a warning that headers have already been sent. I put "die;'" as first line in my method so the header is sent somewhere else before? |
# |
Dec 3rd 2019, 15:54 |
josbeir |
@noel read up on json:api spec |
# |
Dec 3rd 2019, 15:45 |
noel |
Any CRUD masters here? :slightly_smiling_face: What does this config setting do? `_jsonApiBelongsToLinks` |
# |
Dec 3rd 2019, 15:44 |
ndm |
Pre new HTTP stack I was storing the global listeners in the config, and then apply them manually on test setup. But `Application::bootstrap()` should work, gave it a quick test and it works as expected, it's run for each test and will register events on the fresh event manager. |
# |
Dec 3rd 2019, 15:34 |
birdy247 |
doesnt work :( |
# |
Dec 3rd 2019, 15:34 |
birdy247 |
actually |