Skip to main content

Troubleshooting

Here are solutions to some common issues you might encounter during CMS integration.

  • 404 Errors on Pages: If you are getting 404 errors for your CMS pages, the most likely cause is in your CMSProvider. Double-check the getPage implementation to ensure it's correctly fetching data from your CMS and transforming it into the required Archibald Page format without errors.

  • Preview Mode Not Working: Preview mode often requires special configuration.

    • Check that you have correctly configured the previewOptions on your CMSClient.
    • Ensure your CMSAdapter's getPreviewWrapperComponent is working as expected if you use a script-based preview system like Contentful's.
    • Verify that your CMSProvider correctly handles preview-related parameters (like a preview ticket or token) when fetching data.
  • Data Mismatches between Server and Client: This can happen during hydration if the data rendered on the server is different from what the client expects. Ensure that the data transformation logic is consistent between your CMSProvider (server) and any client-side data handling.

  • CORS Errors: If you are getting Cross-Origin Resource Sharing (CORS) errors, it means your CMS API is not configured to allow requests from your application's domain, especially when fetching from the browser. Ensure your CMS's CORS policy whitelists your development and production domains.