Open JulienHenrotin opened 1 year ago
I tried to build and run your reproduction inside Stackblitz, It seems to work fine. Did I miss something in your repro?
@farnabaz No you didn't miss anything. I made a reproduction because GitHub ask me. But my problem only appears on my production server. The reproduction it's like my dev environement, no problem no error ... It's really to illustrate my project
This is strange, the behaviour should not change in different env. If you be able to create a reproduction, we can debug it faster
Yeah, that's why I'm lost on this issue. I use Docker on my test and production server so in theory the environment is the same.
The difference I found is in the header of the request but it's not supposed to change how nuxtContent requests work...
Header request for test server
Header resquest for production server (the one with problem)
Environment
Windows_NT
v18.14.1
3.3.3
2.3.2
npm@9.3.1
vite
ssr
,typescript
,css
,build
,vite
,runtimeConfig
,modules
,ignore
,app
@pinia/nuxt@0.4.7
,@nuxt/content@2.5.2
,@vueuse/nuxt@9.13.0
,nuxt-typed-router@3.0.9
,@intlify/nuxt3@0.2.4
,magic-regexp/nuxt
Build Modules:
-
Reproduction
https://stackblitz.com/edit/github-jac6wl?file=app.vue
Describe the bug
Hi ! I face a mysterious problem with
queryContent()
In my project i have 2 folders in /content folder : /fr & /en I want to get all documents from one or other folder. So I use
queryContent().find()
with a string (fr or en) to fetch my docallGuides.value = await queryContent(localFolder.value).find()
On my production server this request always return ALL my documents. In both folder /fr and /en. Even if I pass a full document path in queryContent it doesn't give me the good document but an array with all my doc. But on localhost and on dev server no problem I have what I want with my request. My project run with a same docker for dev server and prod server.Do you have any ideas? What could impact the system and change the result of nuxtContent requests?
Observations
In production server, request and answser
![image](https://user-images.githubusercontent.com/23408596/230314670-2d8596f8-07d6-43a5-8bd9-2de7b4d8f3e5.png)
In developement server, request and answer
![image](https://user-images.githubusercontent.com/23408596/230315267-10663d7c-d908-4621-a52a-307603fc2562.png)
Additional context
No response
Logs
No response