- Issue created by @nicxvan
- πΊπ¦Ukraine khiminrm
I can confirm that using
accessCheck()
will return empty results. I've tested with Postman by making requests to the endpoint.
Also I've found thataccessCheck(FALSE)
was already used in some lines before. Attaching a patch so the tests can be run. - Status changed to Needs review
9 months ago 12:29pm 21 February 2024 - Status changed to RTBC
9 months ago 2:17pm 21 February 2024 - πΊπΈUnited States nicxvan
Thank you for reviewing, I don't believe the patch is necessary for tests, this was moved to gitlab ci already and the tests passed.
https://git.drupalcode.org/issue/commerce_shipstation-3422751/-/jobs/863029I've moved to RTBC since you confirmed the fix as well with Postman.
-
khiminrm β
committed bb67327b on 2.x authored by
nicxvan β
Issue #3422751 by nicxvan: Current dev version does not work for...
-
khiminrm β
committed bb67327b on 2.x authored by
nicxvan β
-
khiminrm β
committed cdb036fe on 2.x
Issue #3422751 by nicxvan, khiminrm: Clean up code.
-
khiminrm β
committed cdb036fe on 2.x
- Status changed to Fixed
9 months ago 9:06am 22 February 2024 - πΊπΈUnited States TomTech
Thanks for identifying this and making the fix!
For context, this regression was introduced because PHPStan flagged the query as missing the accessCheck(), which became a required call in D10. See: https://www.drupal.org/node/3201242 β
The normal fix is to add
$query->accessCheck();
, as this is the default behavior in versions prior to D10.In this particular case,
->accessCheck(FALSE);
was being invoked earlier in the code, but through a chained call, which PhpStan did not identify.I should have caught that when making the D10 compatibility/PhpStan fix.
Automatically closed - issue fixed for 2 weeks with no activity.