Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
jsonapi.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Jan 2019 at 12:24 UTC
Updated:
3 Apr 2020 at 22:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersHi killes! 👋 Cool to see you're using JSON:API :) Looking forward to hearing your unfiltered feedback about it: the good, the bad, the ugly.
That definitely sounds like a bug. Sorry about that! We'll need a regression test for this concrete scenario. There are lots of examples already in
JsonApiRegressionTest. If you can write that test, I can promise a very fast fix. If you can't, no big deal, but then it might take a few days more.Comment #3
killes@www.drop.org commentedHi Wim!
I will see if I can find the time to write the test.
So far I have no major complaints about JSON API.
Were you able to replicate this? I am unsure whether it is specific to my setup.
Comment #4
wim leersI doubt it is specific to your setup. Rather than reproducing it manually, it's easier to write the test coverage in your place :) Reproduced!
Now that I think about this … I'm not 100% certain this is really a bug: it might be a feature request. https://jsonapi.org/format/#fetching-includes says this is something the server may support. Are you saying that this used to work on a previous version? If so, on which version?
This seems like it's something worth supporting. But it'd be helpful to know whether this used to work and we accidentally broke it, because then I'd dig in to the issue that broke it.
Comment #5
wim leersThis comment still needs to be updated.
Comment #7
killes@www.drop.org commentedI do think that it used to work with v1 of JSON API.
If it is not supported, the server should IMO return a 400 and not ignore the parameter.
You may consider it a feature request to return the data.
Of course I could first do a POST without include, then do a GET with include. I'd consider that a fair workaround if you don't plan to implement this.
Comment #8
wim leersComment #10
wim leersI did some archeology, and found that #2997600: Resolve included resources prior to normalization indeed broke this. If you run the test coverage in #8 against
4c23dce(the commit for #2997600) it fails, and in the preceding commit it passes.Congrats, you're apparently the first person in over 3 months to use this feature of JSON:API 😀 👌
Comment #12
killes@www.drop.org commentedDespite the failed test the patch is working.
Comment #13
wim leersNo time to dig in to the reason for that failure right now. It wasn't failing locally for sure.
I realized this also was a problem for
PATCH, not justPOST.Comment #15
wim leersLOL.
nodeentity type's weird permissions still trip me up after more than a decade. 😵Comment #16
wim leersCleaning up & make stricter.
Comment #17
wim leersThis should fail.
Comment #20
wim leersTest-only patch in #17 is failing, #16 is passing. I don't see why I'd need to wait for @e0ipso or @gabesullice to RTBC/commit this since this involves a one-line fix + test coverage for a regression.
Comment #22
rpayanmMoving to Drupal core's issue queue.
I'm working on https://www.drupal.org/project/drupal/issues/3122113