Skip to content

How to render <ContentDoc> and ignoring query parameters #1988

Closed Answered by svirmasalo
svirmasalo asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

This was the issue actualy:

I used route.fullPath on a queryContent when I should have used route.path.

<script setup>

const route = useRoute();
//....

const parkQuery = await queryContent({
  where: {
    _path: route.fullPath, // <-- Full path includes query params which caused the error. Use route.path instead.
  },
}).findOne();

//...

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by svirmasalo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant