Skip to main content

Questions tagged [live-preview]

Craft CMS allows editors to preview their content as they create and edit. This tag relates specifically to using and integrating with the live preview feature.

Filter by
Sorted by
Tagged with
0 votes
1 answer
12 views

Entries Live Preview Only Reflects Changes After 'Save' and Not On Drafts

I just started using CraftCMS Pro 5.4.6 without access to the backend (only Control Panel), so did my limited research to the best of my ability. When I'm creating entries, the 'Preview' button ...
redstrawb's user avatar
1 vote
0 answers
53 views

Craft 5 MultiSite Setup different Live Preview Links

I'm currently developing a MultiSite website where each site has its own domain. TBH, it's my first CraftCMS project. Bear with me if the answer is very obvious. .env SITE_ONE_URL=https://site-one.com/...
Pippado's user avatar
  • 11
0 votes
0 answers
111 views

Craft CMS 5 Headless live preview using nuxt not working

I'm not understanding how the preview mode exactly works trough graphql queries for Craft CMS headless. Using Craft CMS 5. From what I read, all I have to do is add the 'token' in the headers of the ...
mtsfrstd's user avatar
1 vote
0 answers
42 views

How to work with structure nested entries on live-preview?

Can I get some guidance/help on how to make work structure section type on the live preview please? Everything is fine when the section is a single or a channel. I am working on a few projects, some ...
Adam Fernandez's user avatar
1 vote
1 answer
239 views

Multi-site entries have incorrect preview target

I have a problem with preview links in a Craft multi-site configuration. We’re on Craft 3.7.x and have two sites: default and staff. Each site is configured with its own base URL, the default site is ...
Dalton Rooney's user avatar
1 vote
1 answer
76 views

Matrix content disappears in Live Preview when updated

I'm having an issue where, if I edit any matrix content in Live Preview, all matrix content disappears. When I first open preview, any existing matrix content will display properly, but as soon as I ...
artmem's user avatar
  • 1,022
0 votes
0 answers
92 views

Unclear on Live Preview, multisite, Craft 3.4

My homepage is assembled from a set of entries, so creating Live Preview for a single one of those entries isn't helpful. I am unclear on how to create a Live Preview for all the entries in a section. ...
4midori's user avatar
  • 668
1 vote
0 answers
355 views

Craft CMS Headless - Preview mode

I'm new on craft and I'm using headless mode with a nextJs frontend application. I've tried to configure the preview mode to load the frontend, but I didn't find how to do that. The frontend ...
William Luis Alberton's user avatar
1 vote
1 answer
345 views

No live preview & SEO plugin cannot find content on page

When I try to live preview my craft site the content of the live preview is blank: This is happening for all pages. I have set the template file for the page to use: I am running Craft Solo 3.6.12 ...
Wally's user avatar
  • 343
2 votes
1 answer
312 views

"Single" Entry page gives 404, even though it's enabled

I added a new Single Entry on my site and populated it with content. When I try to access it at the URL I set, it only returns a 404 error, as if the page were disabled. It's not disabled, though. I ...
GDP2's user avatar
  • 141
1 vote
1 answer
44 views

Existing contents get deleted on Live Preview when adding new content on a matrix field

When I add a new content for a matrix block field on an existing entry, all its previous contents gets deleted from the Live Preview, except for the editor which still has the previous contents. And ...
Honey Jean Cariliman's user avatar
1 vote
1 answer
792 views

Headless Live Preview with Gatsby

I am following Andrew Welch's post here - https://twitter.com/nystudio107/status/1168220713158942720?lang=en I used the gatsby-config.js file he shared here - https://gist.github.com/monachilada/...
fxfuture's user avatar
  • 279
5 votes
1 answer
2k views

How do you set up live preview for headless Craft CMS installs connected to Gatsby?

How do you set up live preview for headless Craft CMS installs connected to Gatsby?
Anonymous's user avatar
  • 105
2 votes
1 answer
1k views

Headless CraftCMS: How can I tell Craft to load live preview from a different (sub)domain?

I will be using CraftCMS (Craft Solo 3.3.18.4) in headless mode as the backend for a Rails app. The Craft instance lives on a different subdomain. How do I instruct craft to use the rails app URI ...
aaandre's user avatar
  • 155
1 vote
1 answer
39 views

Fetch locale entries does not work in Live Preview

I need to display booth local and localized entries in the same page. So I fetch the different localized entries like this : {% set localeEntry = craft.entries.id(myEntry.id).site('default').one() %} ...
scandella's user avatar
2 votes
1 answer
121 views

Multisite, second language Live Preview not working

I have an English site - https://dev.mysite.com and a Japanese site - https://dev.mysite.com/jp. Live preview works great for the English site, but the Japanese site has the following error: Mixed ...
Kelly B's user avatar
  • 76
1 vote
1 answer
451 views

Live Preview not showing content, Craft 3

I use the same templates for live preview as for the front end. Until a recent change in Craft 3, they worked fine for live preview, then they stopped showing most fields. I use a lot of includes to ...
4midori's user avatar
  • 668
1 vote
1 answer
103 views

On multisite setup, currentUser not true in LivePreview

On multisite setup, I have problem to get LivePreview working (Craft 3.3.4). I have one domain live, other not, so it displays Maintenance Page. But I need the editors to edit the entries on that ...
klaxon's user avatar
  • 65
1 vote
1 answer
2k views

Where to enter URL for Live Preview in Craft 3?

Pretty sure I've seen where you can enter the URL for an entry type so Craft knows what page to display during live preview. But I can't find that now. I'm looking in the entry types, and I can't ...
BBaysinger's user avatar
2 votes
2 answers
886 views

"Template not found" in live-preview

I am using docker for my local webdev and am new to Craft CMS. Currently I have a simple setup running, however, my Live-Preview does not seem to work and throws the "Template not found" error. Yet, ...
Ignism's user avatar
  • 21
1 vote
1 answer
2k views

Refused to display/connect when previewing entry on multi-site setup

I run a multi-site setup with four sites; one on unicorn.com and one on all-your-base.com. The way Craft CMS licensing works, you can run multiple sites on different domains on the same license/...
nitech's user avatar
  • 679
2 votes
1 answer
126 views

Navigation is throwing Twig error when trying to 'preview' a disabled entry

I have an entry that needs to be disabled until the content is finalized. I am not able to 'preview' the entry unless I enable it. If I remove the navigation code, 'preview' will work on the disabled ...
user9494's user avatar
2 votes
1 answer
867 views

Live Preview not loading - https / http conflict

My live preview isn't loading. I'm getting the following error: Mixed Content: The page at 'https://www.site.com/admin/entries/pages/611-title' was loaded over HTTPS, but requested an insecure ...
artmem's user avatar
  • 1,022
1 vote
0 answers
152 views

Multi site live preview not working on index page

I'm on Craft 3.1.17.2 My multisite setup is using different domains. If I'm on a.com, I can Live Preview everything on b.com fine, except the homepage. I get the error Access to XMLHttpRequest at '...
mijewe's user avatar
  • 336
2 votes
2 answers
264 views

Craft 3.1.7 live preview multi-site only works on home page

I am running sta-A and site-b on same installation. I have cookie set for domain and have htaccess with CORS origin set to allow *, and also updated the nginx config to allow CORs. I know this last ...
joomkit's user avatar
  • 2,082
1 vote
0 answers
50 views

Can scripts loaded as ES Modules work with Live Preview?

How can a script loaded as an ES module be reinitiated after changes are made in Live Preview? In my experience a script loaded as a module is executed the first time Live Preview is opened, but then ...
Stephen Bowling's user avatar
1 vote
2 answers
616 views

Live Preview for Upcoming Entries

I have an Events section on my site, and to display upcoming and passed events (entries with a status of pending or expired) I manually set the entry in the template: Where the URL is /events/my-...
kmgdev's user avatar
  • 1,209
1 vote
1 answer
168 views

Removing the LivePreview and Share Buttons?

Is there a way to deactivate this functionality? We dont want our clients to use it just yet. I could delete them with my Module's js, but it is triggered after the site is build and the "popping" ...
Leonardo's user avatar
  • 471
1 vote
1 answer
145 views

Why is Live Preview scrolling to the top of page after every change?

Having an issue with Live Preview scrolling to the top of the page in the preview area on every update made (even title field). Narrowed it down to it not being a browser issue as it works plum good ...
Brian Larson's user avatar
1 vote
1 answer
917 views

How can I reload the Live Preview Iframe window using JS

I tried to reload the iframe window using JS but haven't had any luck getting the lp-iframe iframe element, I was thinking I could do it using the Window.Craft object but not sure how? setTimeout(()=&...
Jai Sandhu's user avatar
0 votes
0 answers
83 views

Client not able to access live preview or offline site

Is there any obvious reason why a client is not able to access live preview or an offline site? I've tested the login myself and it works OK. The client has tried using IE on a PC and Chrome and ...
Andrew's user avatar
  • 748
7 votes
2 answers
4k views

Live preview using Vue.js

I'm building a Vue.js site with Craft as the backend, which works pretty well so far. The only thing I can't get to work yet is live preview. Vue-Router relies on the window.location which is flawed ...
Moritz Friedrich's user avatar
1 vote
1 answer
327 views

Live Preview not working in some sections

Live preview works in some sections, but not ones that use routes and have "entries in this section have their own urls" deselected. Is this expected behaviour? Is there any way to use live preview ...
user7150's user avatar
1 vote
1 answer
343 views

Two domains - single install - Live Preview works only on one

I have a multi-site setup on two different domains (actually subdomains) with a single Craft install. I have modified config/general.php file to make it work on both the subdomains. Each domain has ...
hvs's user avatar
  • 315
1 vote
1 answer
170 views

Stop window refreshing in Live Preview?

I am working on LivePreview and the window it's get loaded at every change. It is possible to do that only when I will click the Save button?
user6644's user avatar
3 votes
1 answer
87 views

Apply different classes and styles when in 'live preview' pane

Is there any way of adding a class onto a page body when it is viewed within the 'live preview' pane? I can then use this to make things either show or not show. I want to do this to highlight ...
ianp's user avatar
  • 165
3 votes
1 answer
706 views

Front-end Editing, with Live Preview

I am working on an intranet in Craft CMS. Front-end editing is a very important part of this, and I want to get it perfect. As it is now, the live preview is perfect for what I want, it provides ...
Syversen's user avatar
  • 485
1 vote
0 answers
50 views

DateTime is null in Live Preview

I made a custom field type (two datetime fields for starting / ending time). They have the good value when I loop in value in an entry, but have null value in Live Preview. Do you have an idea of what ...
Nancy's user avatar
  • 21
0 votes
1 answer
69 views

Is it Possible to Use Live Preview with Global Settings

I know that out of the box one cannot use Live Preview with Global Settings. I am wondering if it is possible to write a plugin or in some other manner get Live Preview to work with Global Settings.
Moshe's user avatar
  • 135
2 votes
1 answer
1k views

Live preview not working for CORS

For production site, the backend url is like - 'www.abc-prod.com' While the actual live site url is - 'www.xyz.com' When opening live preview for an entry, page never loads. Instead '301 Moved ...
Amey Dahale's user avatar
1 vote
2 answers
242 views

Live Preview fails to load

Live preview is not working. The following error appears in Inspect Element (Safari). It then times out and generates a whole bunch of can't load errors. but this appears to the root of those ...
Hellyar's user avatar
  • 931
1 vote
2 answers
440 views

Live Preview failing in Safari and Firefox only

New Craft user here and I am working on wrapping up my first Craft site and am running into a Live Preview error. When Live Preview is activated in either Firefox or Safari, I just get a blank white ...
Jesse O'Neill's user avatar
1 vote
1 answer
397 views

Does Google Analytics track Live Preview 'page views'?

Will Google Analytics be recording page views / events from within a Live Preview? And if so, is there a way to prevent this from happening? My understanding is that with Google Analytics you can set ...
Mike Vaux's user avatar
  • 480
2 votes
0 answers
169 views

Live Preview not showing correct content when using single page app with JavaScript

So I am creating a website using Craft with JavaScript for making it a single page app. I load my layout which then calls the pages which works well. The only problem is that when viewing pages ...
nickGR's user avatar
  • 197
2 votes
1 answer
268 views

.find() not working with live preview?

I have an Entry Type with a field called Gallery with a handle of gallery. Here are two examples of how I can access the Gallery field in a template: {% set images = entry.gallery %} {% set images = ...
Peter Tell's user avatar
  • 1,838
4 votes
2 answers
562 views

Is there a way a plugin can watch for live preview updates?

I'm working on a site that involves taking a URL and then getting information about that URL using an API. The URL is entered into a field in a Matrix block, and then another field in the same Matrix ...
Gavin Anderegg's user avatar
0 votes
1 answer
244 views

Live Preview not working - showing home page instead

I've got a Structure entry, enabled, but Live Preview (or just viewing the page on the public site) shows the home page instead. Might I have a setting incorrect? Edit: It looks like previewing any ...
4midori's user avatar
  • 668
2 votes
1 answer
479 views

Live Preview only works with published entries

We have a site where Live Preview only works with entries that have been previously published. When trying to preview entries we're working on (or drafts), we see either the latest entry for that ...
Mike's user avatar
  • 719
1 vote
3 answers
1k views

Show Live Preview even if whole page is disabled

The whole page is disabled in the backend. Like in this screenshot: Now I can't see anything in the Live Preview. My code starts with: {% for entry in craft.entries.section('aboutus') %} If I set ...
Jonathan Schiffner's user avatar
1 vote
1 answer
215 views

Live Preview error when entry is disabled

When the entry is disabled, the Live Preview only shows things which are outer of the main loop. This is a part of my code: {% include "header.html" %} {% for entry in craft.entries.section('...
Jonathan Schiffner's user avatar