-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve DX for scenarios where Next.js and Drupal integration is not working correctly #62
Comments
Common failures with Next.js and Drupal integrationContent mismatchIn the case of a content mismatch, there are two options to fix this:
Incompatible web server setup or incorrect environment variables generated
Check if you are able to make a GET request to If you are using valet as your environment, please see laravel/valet#771 (comment) for the known solution. If you are using lando as your webserver, check your .env.local file and see if NEXT_PUBLIC_DRUPAL_BASE_URL variable, https was used. It is a known issue where it seems on lando setup, the Drupal URL generates with https when it should just be http. Once ACMS setup is done, |
The API for executing these checks have been added: #65. Next step on this is to write some unit tests for the new API which was splitted to another PR since we still need to setup Jest. After that, we can make a new release of |
We have seen significant reduction in support requests related to connecting Acquia CMS with Next.js since #65. We can open new issues in case we identify some additional use cases that should be covered. |
There are multiple different ways how the Next.js and Drupal integration won't work correctly. This includes (but not limited to):
Proposed solution
Do a "preflight check" which ensures that fundamental aspects of the integration are working as expected. Fail early in case it is determined that the integration with the backend is not working as required by the Next.js app. Provide helpful error messages with links to documentation that documents how most common failures can be debugged.
The "preflight check" could check that the content model includes all content types from
CONTENT_TYPES
in[...slug].tsx
. This would happen by checking/jsonapi
which would also work as a test for ensuring that the API from the backend can be reached.The text was updated successfully, but these errors were encountered: