-
Hi all, I'm just getting started with druxt, while I've been developing a lot of time with Gatsby and Wordpress, i am keen to learning this. Describe the bug My drupal site is hosted locally and the jsonapi endpoint is working in the browser. I also set the correct link as baseUrl in the nuxt.config.js: http://backend.test But still no dice, I also tested it with one of the examples and when changing the baseUrl to a local development url, it gives me the same message. When using https://demo-api.druxtjs.org it works. Does anyone encountered the same problem? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
Hi @daan-ef2, Can you provide your What are you using to run your Drupal site? DDev, Lando, docker-compose, etc. If it the frontend connects to the hosted backend, and the JSON:API is accessible in a browser, it's likely the communication between the frontend and backend. If you are using docker containers, ensure they can access each other. |
Beta Was this translation helpful? Give feedback.
-
Hi mate, Thanks for your help so far. |
Beta Was this translation helpful? Give feedback.
-
Hi, Back again ;-) (other account), when trying to access the jsonapi via browser (chrome) or via CURL the following message appears: {"jsonapi":{"version":"1.0","meta":{"links":{"self":{"href":"http://jsonapi.org/format/1.0/"}}}},"errors":[{"title":"Bad Request","status":"400","detail":"The following query parameters violate the JSON:API spec: \u0027q\u0027.","links":{"via":{"href":"http://ef2-backend.test/jsonapi"},"info":{"href":"http://jsonapi.org/format/#query-parameters"}}}]}% So its expects a Q parameter, hence the 400 error. Is this because my Drupal installation is not correct? |
Beta Was this translation helpful? Give feedback.
-
Hi, I guess I need a new pair of glasses. Read the error again and it was clear. Found a solution over here: After a cache rebuild i finally have a result and can start playing with Druxt 👍 |
Beta Was this translation helpful? Give feedback.
Hi,
I guess I need a new pair of glasses. Read the error again and it was clear. Found a solution over here:
https://www.drupal.org/project/jsonapi/issues/2984044
After a cache rebuild i finally have a result and can start playing with Druxt 👍