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
1 vote
1 answer
21 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 ...
user avatar
  • 950
0 votes
0 answers
51 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. ...
user avatar
  • 684
1 vote
0 answers
126 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 ...
user avatar
1 vote
1 answer
116 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 ...
user avatar
  • 275
2 votes
1 answer
103 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 ...
user avatar
  • 141
1 vote
1 answer
39 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 ...
user avatar
1 vote
1 answer
663 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/...
user avatar
  • 207
4 votes
1 answer
1k 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?
user avatar
2 votes
1 answer
661 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 ...
user avatar
  • 155
1 vote
1 answer
36 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() %} ...
user avatar
2 votes
1 answer
90 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 ...
user avatar
  • 76
1 vote
1 answer
311 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 ...
user avatar
  • 684
1 vote
1 answer
76 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 ...
user avatar
  • 65
1 vote
1 answer
1k 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 ...
user avatar
2 votes
2 answers
707 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, ...
user avatar
  • 21
1 vote
1 answer
1k 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/...
user avatar
  • 617
2 votes
1 answer
110 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 ...
user avatar
1 vote
1 answer
609 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 ...
user avatar
  • 950
1 vote
0 answers
125 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 '...
user avatar
  • 326
2 votes
2 answers
182 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 ...
user avatar
  • 1,886
1 vote
0 answers
43 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 ...
user avatar
1 vote
2 answers
467 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-...
user avatar
  • 1,075
1 vote
1 answer
136 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" ...
user avatar
  • 359
1 vote
1 answer
112 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 ...
user avatar
1 vote
1 answer
720 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(()=&...
user avatar
0 votes
0 answers
79 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 ...
user avatar
  • 700
7 votes
2 answers
3k 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 ...
user avatar
1 vote
1 answer
301 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 ...
user avatar
  • 61
1 vote
1 answer
286 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 ...
user avatar
  • 283
1 vote
1 answer
127 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?
user avatar
3 votes
1 answer
84 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 ...
user avatar
  • 156
3 votes
1 answer
592 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 ...
user avatar
  • 440
1 vote
0 answers
48 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 ...
user avatar
  • 21
0 votes
1 answer
67 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.
user avatar
  • 135
2 votes
1 answer
908 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 ...
user avatar
1 vote
2 answers
189 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 ...
user avatar
  • 891
1 vote
2 answers
416 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 ...
user avatar
1 vote
1 answer
340 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 ...
user avatar
  • 480
2 votes
0 answers
164 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 ...
user avatar
  • 197
2 votes
1 answer
262 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 = ...
user avatar
  • 1,818
4 votes
2 answers
544 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 ...
user avatar
0 votes
1 answer
230 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 ...
user avatar
  • 684
2 votes
1 answer
381 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 ...
user avatar
  • 699
1 vote
3 answers
840 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 ...
user avatar
1 vote
1 answer
185 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('...
user avatar
2 votes
1 answer
437 views

Live Preview in different languages on different top level domains

Our website offers three different languages. Each language has it own top level domain (example: domain.de, domain.it, domain.fr). Everything works like it should, except the Live Preview function. ...
user avatar
  • 1,317
0 votes
1 answer
56 views

My live preview for blog entries is not working on my computer, but is working for my account on other computers

When I go to live preview to view my blog entry in draft mode, all I see is a white screen. My co-workers have tested under my account on their computers and it works just fine. Does anyone have any ...
user avatar
  • 1
1 vote
1 answer
318 views

Live Preview and CDN caching

We have a problem with using Live Preview on a site that uses CDN caching [CloudFront]. When opening Live Preview a POST is sent to the actual page URL containing the information and the response is ...
user avatar
  • 173
1 vote
2 answers
665 views

No live preview available when entry status is set to disabled?

I have a few entries which are set to disabled. It seems that the live preview is not working then. It only works when the entry status is enabled. This seems more like a bug than a feature, right? ...
user avatar
  • 1,456
1 vote
1 answer
154 views

Previewing different languages

I have setup 10 languages for a project which are all working fine when accessed directly, eg 'craft.dev/fr/page','craft.dev/zh/page','craft.dev/es/page'. However when in admin there are two ways of ...
user avatar
  • 1,886