Route resolver always returns 404 when defining routes

Hello all,

I'm trying to setup some routes to a journal post and not having much luck, I've read through the other posts on here and read these docs https://prismic.io/docs/technologies/the-route-resolver-nuxtjs

Whenever I seem to set resolvers the whole site 404's, no matter which URL I try to visit.

I set this site up using slice machine
journal_post has a constraint relationship to a journal_category.
Category has a constraint relationship to journal (singleton)

_lang: {
    _uid
    index
        journal: {
        index
        _category: {
          index
          _uid
        }
    }
}

routes: [
    {
        type: 'journal_post',
        path: '/:lang/journal/:category/:uid',
        resolvers: {
            category: 'journal_category',
            journal: 'journal_category.journal'
        }
    }
]

Do I need to define the resolver for journal above?

Any pointers to where I may be going wrong would be most helpful.

Thanks :slight_smile:

Hello Jake,

Thanks for reaching out to us.

I need to debug the code. For this can you provide me the Github repo or Zip file of your project?

Thanks,
Priyanka

Hello Priyanka,

I have solved this issue with the help of Fran├žois.

I was targeting the wrong id in the relationship. It needed to be the field ID in the mask.

Thanks
Jake

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.