Some Landing Pages Not Working on Local / Previews not working in Env

Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank.

Builder content link
Builder.io: Drag and drop Visual CMS - unpublished
Builder.io: Drag and drop Visual CMS - published

Builder public api key
254cfce5354240d38e3e2a1ffd4dd637

What are you trying to accomplish
I am trying to integrate previews of landing pages on our site. Currently I can view only one (Builder.io: Drag and drop Visual CMS) on my local, published or not. Currently another dev can view the published pages on their local fine. Last week we had the reverse situation where I could view them fine (and they could not) without any discernable changes to our code or the content. Can’t find an error from builder api.

Code stack you are integrating Builder with
Vue, Nuxt

Reproducible code example
this is our asyncData api call for said content

        `https://cdn.builder.io/api/v2/content/landing-page?apiKey=${process.env.BUILDER_PUBLIC_API_KEY}&query.query.value=%2Flp%2F${route.params.page}&fields=data.partnerName,data.landingPageType,data.seoCanonicalUrl,data.seoDescription,data.seoIndex,data.seoPageTitle,data.step2,data.title,query,data.category.value.data&includeRefs=true&includeUnpublished=true`

Hi @huhgferg, it looks like your preview URL for the ‘landing-page’ model is set to a default fallback url. I would suggest updating the preview url in the model options to your localhost if your team is working in a development environment. This is part of what connects your codebase to the Visual Editor’s iframe. Check out the docs below for more info and let us know if you still have questions!

Editing and Previewing Your Site
Getting the Preview URL Working

Is there configuration in the model settings itself or each piece of content in the top right preview url? I can’t see the model settings because I’m getting this which has been happening all morning:

This also does not explain my local machine blocking some of the content and not others.

Hi @hughferg you can take a look at the first link above to see the different options available but, yes, setting it in the model options allows it to persist. Can you try clearing your browser cache or using an incognito browser to see if that resolves the error?

Regarding the api call, it seems to be working ok for me right now and I didn’t see any anomalies in our logs related to your space in the past couple weeks. If you are using the Builder 2.0 Vue SDK (@builder.io/sdk-vue) we recommend using the SDK to fetch content rather than calling the Content API directly. You can see an example of fetching content with the SDK’s getContent() function here.