-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Describe the bug
We're trying to migrate from druxt-site 0.10.4 to the latest version. When the update is applied, the website becomes 10 times slower than usual and sometimes doesn't even load. After looking at the HTTP server logs, I realised that there's a lot similar requests happening:
/jsonapi HTTP/1.1" 200 15314
/en/jsonapi/jsonapi_resource_config/jsonapi_resource_config HTTP/1.1" 200 232
/en/jsonapi HTTP/1.1" 200 15314
These requests happen at build time using "nuxt dev" but also when trying to load a simple node. (See attached screenshots below)
We also end up having timeout on production like environment:
NuxtICA > WARN 503: Loop detected
NuxtICA > URL: https://backendmrs.quadient.com/fr-ch/jsonapi/jsonapi_resource_config/jsonapi_resource_config
I'm wondering if the following piece of code might be causing all of this:
getIndex from druxt.ssr.js / druxt.esm.js
if ((this.index || {})[prefix] && !resource) {
return this.index[prefix];
}
if ((this.index || {})[prefix] && resource) {
return this.index[prefix][resource] ? this.index[prefix][resource] : false;
}
To Reproduce
Steps to reproduce the behavior:
- Uninstall druxt-site:^0.10.4
- Install latest druxt-site version
- Run "npm run dev" or "nuxt dev"
- Have a look at the logs
Expected behavior
Frontend to work as expected
Your Environment (please complete the following information):
Backend:
- Docksal (Docker based)
- Drupal core 10.1.5
- DruxtJS 1.2.0
- Decoupled Router 2.0.4
- Multilingual (we have several languages installed)
- Layout paragaphs + paragraphs modules
Frontend:
- Nuxt @ v2.16.3
- Druxt @ v0.22.0 (Previous version: Druxt @ v0.16.0)
- druxt-site 0.14.2 (Previous version: druxt-site 0.10.4)

