Is preview and the toolbar supported on the OOB Nuxt/SM project? When I hit preview the correct page loads but not with the updated content or the toolbar. I created a preview in my settings pointing to the localhost and with "/preview" in the link resolver field.
Hello Shawn, yes, previews work with SM nuxt projects.
To be able to do a test on my side, could you tell me:
- Which browser are you using, and if its Chrome, the current version installed on your machine?
- The URL of your repository
You can send this info to me in a private dm if your prefer.
Thanks a lot
@Phil : Thanks for looking into that. I am happy to hear it is not me. lol. I am in fact using Chrome. I will check with another browser. Please keep me informed.
edit: I tried in Edge and Safari as well and still was not getting the toolbar or the updated content.
I have the same problem.
No toolbar visible and the preview works but with not the saved (updated) content.
I send you my prismic rep in dm
We are working on the fix for this and it should be done soon. I'll let you know when this is done.
This was fixed last week can you confirm?
I have the same problem, no update of the content in the preview.
Also in the toolbar iframe, the html is empty.
Could you check if my config is ok ?
Can you send me the github link for your project so I can test this?
I sent you a pm
@benoit.jollivet I checked out your project and I was able to preview fine on your homepage. I removed the preview route from the link resolver and
preview: "/preview", from the nuxt.config as these aren't necessary.
Though when I tried to visit the page route
http://192.168.1.50:8000/styleguide without preview I got the following error:
TypeError Cannot read property 'resolver' of undefined
Which I don't really understand, but I saw you had
<slice-zone type="page" :uid="uid" /> instead of
<slice-zone type="page" :uid="$route.params.uid" />
It works fine on the job page though:
So there doesn't seem to be any preview problems.
We resolved your other issue with some investigation too, thanks @hugo.villain.
In the modules of your nuxt.config you have an array inside and array. So you have:
modules: [ [ "@nuxtjs/prismic", "@nuxtjs/google-analytics", "@nuxtjs/sitemap", "nuxt-sm", ], ],
modules: [ "@nuxtjs/prismic", "@nuxtjs/google-analytics", "@nuxtjs/sitemap", "nuxt-sm", ],
Which causes your page to break.
I haven't yet managed to get the preview and the toolbar to work.
I will try again.
Thanks for your time and help.
Can you try in a different browser?
It works on Firefox now.
But not in Chrome and Safari.
It works for me in Chrome. Can you try changing your settings in Safari as described here? Then test again. Can you test locally too?
I'm glad you figured it out hopefully this thread will help others in the future.