You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When navigating to /:Slug unable to get content / [Vue warn]: Unhandled error during execution of setup function / Uncaught (in promise) FetchError: 404 Document not found!
#1565
Closed
KhalidT2 opened this issue
Sep 28, 2022
· 0 comments
· Fixed by #1612
runtime-core.esm-bundler.js:38 [Vue warn]: Unhandled error during execution of setup function
at <[slug] onVnodeUnmounted=fn ref=Ref< Proxy {__v_skip: true} > >
at <Anonymous key="/about/corporate-news/company-continues-facility-upgrades" routeProps= {Component: {…}, route: {…}} pageKey="/about/corporate-news/company-continues-facility-upgrades" >
[slug].vue:25 Uncaught (in promise) FetchError: 404 Document not found! (/api/_content/query?_params={%22where%22:[{%22slug%22:{%22$eq%22:%22company-continues-facility-upgrades%22}},{%22_path%22:%22/corporate-news%22}],%22first%22:true,%22sort%22:[{%22_file%22:1,%22$numeric%22:true}]}&previewToken)
at async setup ([slug].vue:25:1)
Describe the bug
We are running into an issue when querying content by the slug field. In our config the field is represented like the following - { label: 'Slug', name: 'slug', encoding: 'ascii', required: true, widget: 'string', hint: 'remember-to-use-lowercase-and-dashes' }
and we are querying the CMS in our slug template with
Environment
Darwin
v16.17.1
3.0.0-rc.8
npm@8.15.0
vite
app
,typescript
,tailwindcss
,modules
,vite
,content
,build
@nuxt/content@2.1.1
,@nuxtjs/tailwindcss@5.3.3
-
Reproduction
We are unable to provide a repository at the time, but these are the errors we are seeing.
GET http://localhost:3000/api/_content/query?_params={%22where%22:[{%22slug%22:{%22$eq%22:%22company-continues-facility-upgrades%22}},{%22_path%22:%22/corporate-news%22}],%22first%22:true,%22sort%22:[{%22_file%22:1,%22$numeric%22:true}]}&previewToken 404 (Document not found!)
runtime-core.esm-bundler.js:38 [Vue warn]: Unhandled error during execution of setup function
at <[slug] onVnodeUnmounted=fn ref=Ref< Proxy {__v_skip: true} > >
at <Anonymous key="/about/corporate-news/company-continues-facility-upgrades" routeProps= {Component: {…}, route: {…}} pageKey="/about/corporate-news/company-continues-facility-upgrades" >
[slug].vue:25 Uncaught (in promise) FetchError: 404 Document not found! (/api/_content/query?_params={%22where%22:[{%22slug%22:{%22$eq%22:%22company-continues-facility-upgrades%22}},{%22_path%22:%22/corporate-news%22}],%22first%22:true,%22sort%22:[{%22_file%22:1,%22$numeric%22:true}]}&previewToken)
at async setup ([slug].vue:25:1)
Describe the bug
We are running into an issue when querying content by the slug field. In our config the field is represented like the following
- { label: 'Slug', name: 'slug', encoding: 'ascii', required: true, widget: 'string', hint: 'remember-to-use-lowercase-and-dashes' }
and we are querying the CMS in our slug template with
We are able to see the fields coming in on the frontmatter in our console.logs, but we are receiving the errors above in the Reproduction.
Thanks in advance!
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: