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
7
votes
2answers
2k 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 ...
6
votes
3answers
955 views

Live preview not automatically updating

any help would be much appreciated. I have Live Preview working on my entries ie. I can see and use the button, but the live preview won't update as I manipulate the content? It was working before so ...
4
votes
7answers
4k views

Live Preview not working

Live Preview isn't working for any kind of entry. Dev or production. I get the following error on chrome's console. jquery-2.1.1.min.js?d=1409764106:4 POST http://undiario.dev/ 500 (Internal Server ...
4
votes
1answer
688 views

Live Preview has No Style

I am a complete novice. Live Preview does not seem to be accessing the stylesheets, which are called in my _skeleton.html. My template is sample.html. I am live, not in dev environment,in case that ...
4
votes
2answers
650 views

Is it possible to prevent disabled Matrix Blocks showing in a Live Preview?

I have a template which loops through Matrix Blocks. The site itself correctly ignores any Blocks which are 'disabled', but on viewing the page in the Live Preview, those Blocks are visible. A key ...
4
votes
2answers
490 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 ...
4
votes
1answer
164 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? 😀
3
votes
1answer
68 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 ...
3
votes
2answers
1k views

Multi locale, multi-domain Live Preview failing

I have a multi-locale site set up with the different locales in different domains phoseon.craft.dev - English site phoseon.it.craft.dev - Italian site etc. I am having problems getting Live Preview ...
3
votes
1answer
759 views

Live Preview Items Without Entry URL

This may be a silly question or a pipe dream, but i was wondering if there is a way to have a live preview for entries without a URL. For instance i have a complicated layered slider on the homepage ...
3
votes
1answer
520 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 ...
2
votes
2answers
594 views

Live Preview only works for Entry variable?

Is there an undocumented shortcoming of Live Preview? Seems to only work where the entry variable is concerned. I'm using a Structure section to create pages with "Chapters". The section (let's call ...
2
votes
1answer
544 views

Issue with Matrix `type` property and Live Preview?

I have problems getting Live Preview to work with this Twig code that gets data from a Matrix field. {{ entry.matrixField.type('copy').nth(0).plainText }} As soon as I remove the type property from ...
2
votes
2answers
527 views

What configuration does Craft need to enable Live View on hoster CloudFlare with SSL/https CP?

In a previous question and answer, I've laid out recent experience in bringing up Craft on the combination of CloudFlare and Railgun offered as a free feature for VPS hosting at Arcustech. The ...
2
votes
2answers
96 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, ...
2
votes
1answer
653 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 ...
2
votes
1answer
241 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 = ...
2
votes
1answer
213 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 ...
2
votes
1answer
350 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. ...
2
votes
1answer
165 views

Live Preview: Hide tabs from live preview

I've noticed that Live Preview mode includes fields from all tabs. Is it possible to specify tabs to be left out of the Live Preview display? For example, if you have an 'SEO' tab which consists of ...
2
votes
1answer
23 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 ...
2
votes
1answer
92 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 ...
2
votes
0answers
155 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 ...
1
vote
2answers
468 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? ...
1
vote
2answers
373 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 ...
1
vote
1answer
306 views

When using .limit on matrix blocks they don't show in live preview

I have a Matrix field setup and working perfectly except for one problem. In my template I'm using .limit to only pull the first two items from the matrix field (I can't use max in the field ...
1
vote
3answers
533 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 ...
1
vote
1answer
110 views

Description and logo at the very top of browser?

All, After we switched from Wordpress to Craft our site description and logo at the very top of the browser tab have been disappeared as shown in the image. Could you please guide me how can I achieve ...
1
vote
1answer
229 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 ...
1
vote
1answer
265 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 ...
1
vote
1answer
119 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('...
1
vote
1answer
98 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/...
1
vote
1answer
129 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 ...
1
vote
2answers
254 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-...
1
vote
1answer
620 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(()=&...
1
vote
1answer
83 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?
1
vote
2answers
151 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 ...
1
vote
1answer
106 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 ...
1
vote
1answer
848 views

Live Preview and Twig blocks [closed]

I'm using {% block content %} and a main layout file. When using live preview the "entire" frame isn't shown (including layout files). Is there an easy way to get the whole template in?
1
vote
1answer
140 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 ...
1
vote
1answer
25 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() %} ...
1
vote
1answer
31 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 ...
1
vote
1answer
22 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 ...
1
vote
1answer
267 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/...
1
vote
1answer
44 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 ...
1
vote
1answer
153 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 ...
1
vote
1answer
76 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" ...
1
vote
1answer
76 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 ...
1
vote
1answer
264 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 ...
1
vote
1answer
262 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 ...