- Issue created by @grasmash
- Merge request !4Replace JSON:API Schema dependency with Open API JSON:API module → (Open) created by grasmash
- First commit to issue fork.
- Merge request !5Issue #3529219: Replace JSON:API Schema dependency with Open API JSON:API module → (Merged) created by balsama
- 🇺🇸United States balsama boston
The last commit fixes the PHPUnit tests. It does not fix the gitlab CI integration. That should be done in a separate issue.
- 🇮🇳India ankitv18
Validated the MR!5
Query builder page throwing 404 error
jsonapi_query_builder_update_10001 isn't executed properly
- 🇺🇸United States balsama boston
It looks like you didn't update the composer dependencies when testing the update path? The update hook installs openapi_jsonapi, which the MR requires in its composer.json file. But according to your error, you don't have it in your codebase.
As for the JS error, you need to manually rebuild the JS app if you're testing it locally. (cd js; ./build.sh)
I think this all working as designed, but it would still be good to get a manual test that confirms.
- Status changed to Needs review
about 2 months ago 10:29pm 18 August 2025 - First commit to issue fork.
- 🇺🇸United States traviscarden
I've made a lot of progress here--I fixed the update hook a ton of static analysis, and some of the test issues--but I'm still having trouble with the React aspect of the JavaScript functional tests. I've improved the assertions a little and added a commit with some debugging output showing the HTML that Mink is getting before it starts looking for CSS selectors (as in, I actually committed the debugging output file so you can see it). It seems like the React app isn't initializing. It works just fine in manual testing, though. The failures are the same locally as on CI. Can anyone offer any guidance?
- 🇺🇸United States traviscarden
I've identified and fixed several more secondary issues, including a 403 error due to a missing route. Here's where things stand as I take off for the weekend. (Monday is a federal holiday in the U.S., so I won't be back till Tuesday.)
I think all the functional JavaScript tests are failing for the same reason, so I'm focusing on fixing one of them first:
\Drupal\Tests\jsonapi_query_builder\FunctionalJavascript\JsonApiQueryBuilderJsTest::testReactAppLoads()
. The problem seems to be that the test browser (Mink/Selenium) doesn't render any React markup, while a real browser does. I've committed a few HTML dumps and screenshots for comparison:manual_test.htm
(screenshot): Saved from a manual browser visit, shows the React app loading state as expected.custom-debugging.htm
(screenshot): Captured by the test using$this->getSession()->getPage()->getOuterHtml()
, but contains only CSS—no React app markup.simpletest_browser_output.html
(screenshot): Generated by PHPUnit, also contains only CSS and no app markup.
All the functional JavaScript tests are failing with the same error:
1) Drupal\Tests\jsonapi_query_builder\FunctionalJavascript\JsonApiQueryBuilderJsTest::testReactAppLoads Behat\Mink\Exception\ElementNotFoundException: Element matching css ".query-panel-tab[data-tab="fields"]" not found. /var/www/html/vendor/behat/mink/src/WebAssert.php:465 /var/www/html/tests/src/FunctionalJavascript/JsonApiQueryBuilderJsTest.php:113
There are no more errors in the logs:
---- -------------- -------- ---------- ------------------------------------------------------------ ID Date Type Severity Message ---- -------------- -------- ---------- ------------------------------------------------------------ 11 30/Aug 07:12 user Info User xlpztkl0 used one-time login link at time 1756501921. 10 30/Aug 07:12 user Info Session opened for xlpztkl0. 9 30/Aug 07:12 system Info jsonapi_query_builder module installed. 8 30/Aug 07:12 system Info openapi_jsonapi module installed. 7 30/Aug 07:12 system Info schemata_json_schema module installed. 6 30/Aug 07:12 system Info schemata module installed. 5 30/Aug 07:11 system Info openapi module installed. 4 30/Aug 07:11 system Info jsonapi module installed. 3 30/Aug 07:11 system Info serialization module installed. 2 30/Aug 07:11 system Info field_ui module installed. ---- -------------- -------- ---------- ------------------------------------------------------------
That's what I know at the moment. If my Functional JavaScript Test fairy doesn't visit over the weekend, I'll pick this up again on Tuesday.
- 🇮🇳India ankitv18
Hi @traviscarden,
I've validated the functionality of this module and found few issues on sorting tab.
When I add the moderation_state
Drupal\Core\Entity\Query\QueryException: 'moderation_state' not found in Drupal\Core\Entity\Query\Sql\Tables->ensureEntityTable() (line 373 of /var/www/html/docroot/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php).
When I add the UUID or Path field getting 400 error in response.
Drupal\Core\Http\Exception\CacheableBadRequestHttpException: Invalid nested filtering. The field `uuid`, given in the path `uuid`, does not exist. in Drupal\jsonapi\Context\FieldResolver->resolveInternalEntityQueryPath() (line 292 of /var/www/html/docroot/core/modules/jsonapi/src/Context/FieldResolver.php).
- 🇺🇸United States traviscarden
Thank you, @ankitv18. Do you know when these issues were introduced? Are they already there on the main branch, or are they regressions from this issue? And if this issue has introduced them, did they work before my changes and now they're broken?
Are you following a test script on this issue, or are you doing unguided/exploratory testing? If there are tests you're repeating as the issue progresses, would you share your checklist?
- 🇺🇸United States traviscarden
I've redone the local work (I want to make sure I didn't mess one of them up before; I'm not certain.) Here's the update:
manual_test.htm
(screenshot): Saved from a manual browser visit.custom-debugging.htm
(screenshot): Captured by the test using$this->getSession()->getPage()->getOuterHtml()
.simpletest_browser_output.html
(screenshot)
All the functional JavaScript tests are failing with the same error:
1) Drupal\Tests\jsonapi_query_builder\FunctionalJavascript\JsonApiQueryBuilderJsTest::testReactAppLoads Behat\Mink\Exception\ElementNotFoundException: Element matching css ".query-panel-tab[data-tab="fields"]" not found. /var/www/html/vendor/behat/mink/src/WebAssert.php:465 /var/www/html/tests/src/FunctionalJavascript/JsonApiQueryBuilderJsTest.php:121
There are no more errors in the logs:
---- -------------- -------- ---------- ------------------------------------------------------------ ID Date Type Severity Message ---- -------------- -------- ---------- ------------------------------------------------------------ 11 04/Sep 04:12 user Info User kw696290 used one-time login link at time 1756923133. 10 04/Sep 04:12 user Info Session opened for kw696290. 9 04/Sep 04:12 system Info jsonapi_query_builder module installed. 8 04/Sep 04:12 system Info openapi_jsonapi module installed. 7 04/Sep 04:12 system Info schemata_json_schema module installed. 6 04/Sep 04:12 system Info schemata module installed. 5 04/Sep 04:12 system Info openapi module installed. 4 04/Sep 04:12 system Info jsonapi module installed. 3 04/Sep 04:12 system Info serialization module installed. 2 04/Sep 04:12 system Info field_ui module installed. ---- -------------- -------- ---------- ------------------------------------------------------------
- 🇺🇸United States traviscarden
I don't know why the tests are still failing on CI. They're all passing locally, and so is stylelint. I've been instructed to go ahead and disable the failing jobs so we can merge the MR. I have done so, and of course, the build passes now.
I have extracted @ankitv18's comment in #15 to its own issue: 🐛 Errors when sorting Active .
Handing off to @balsama for review and merge.
Now that this issue is closed, please review the contribution record.
As a contributor, attribute any organization helped you, or if you volunteered your own time.
Maintainers, please credit people who helped resolve this issue.