Skip to content
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

Failing to migrate from druxt-site 0.10.4 to latest version #688

Open
0xIml337 opened this issue Nov 16, 2023 · 0 comments
Open

Failing to migrate from druxt-site 0.10.4 to latest version #688

0xIml337 opened this issue Nov 16, 2023 · 0 comments

Comments

@0xIml337
Copy link
Contributor

0xIml337 commented Nov 16, 2023

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:

  1. Uninstall druxt-site:^0.10.4
  2. Install latest druxt-site version
  3. Run "npm run dev" or "nuxt dev"
  4. Have a look at the logs

Expected behavior
Frontend to work as expected

Media
Screenshot_2023-11-16_at_09 43 03
Screenshot-2023-11-16-at-09 31 42
)

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant