previewing experiences when the content source is strapi
editors want to see the personalized page before we publish the experience. what I tried:
- generated a preview link from the experience editor
- link opens the site fine
- but shows only default strapi content, no variant
- regenerated the link, same thing
- slots are integrated and serving in production, so thats not it
no error anywhere that I can find. what decides whether the preview actually kicks in
1 answer
Preview links have three requirements, and a silent fallback to default content usually means one of them is not met:
- The slots must be integrated in the page, which you have confirmed.
- The slot version referenced in the experience must match the version your code requests. If your code pins home-hero@1 and the experience was built against version 2, the preview serves default content. This is the most common cause.
- The domain you open the preview on must be listed in your application's trusted origins. A staging domain that was never added will not preview.
A quick way to diagnose: when a preview is active, a widget appears in the bottom-right corner showing the experience, experiment, audience, variant, and locale being previewed. If the widget does not appear at all, the preview token is not being accepted, which points to the trusted origins. If it appears but shows nothing useful, check the version match.
Also note that preview links are valid for 24 hours. They are shareable with editors and can be regenerated from the experience editor at any time, so an expired link simply needs a fresh one. See the preview documentation for the full requirements.