The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
1answer
9 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
15 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
33 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 ...
2
votes
2answers
52 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, ...
1
vote
1answer
41 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
40 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 ...
0
votes
0answers
36 views

Live preview breaks if adding trailing slash to htaccess

I noticed after one of the latest updates that live preview is no longer working, I seem to have narrowed it down to htaccess file which we have modified to add a trailing slash to all urls. e.g. # ...
1
vote
1answer
72 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
0answers
47 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 '...
2
votes
1answer
70 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 ...
0
votes
0answers
28 views

How To Dump Everything from a Live Preview POST Request?

I want to see every variable Craft sends via POST on a Live Preview request. How can I dump every variable from a Live Preview request?
1
vote
0answers
31 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 ...
1
vote
2answers
196 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
65 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
65 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
586 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(()=&...
0
votes
0answers
58 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 ...
7
votes
2answers
1k 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 ...
1
vote
1answer
243 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
218 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
73 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?
3
votes
1answer
64 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
1answer
499 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 ...
1
vote
0answers
47 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 ...
0
votes
1answer
60 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.
2
votes
1answer
578 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 ...
1
vote
2answers
145 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
2answers
368 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
241 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 ...
2
votes
0answers
148 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 ...
2
votes
1answer
235 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 = ...
4
votes
2answers
455 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 ...
0
votes
1answer
198 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 ...
2
votes
1answer
187 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 ...
1
vote
3answers
488 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
114 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('...
2
votes
1answer
326 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. ...
0
votes
1answer
50 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 ...
1
vote
1answer
250 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 ...
1
vote
2answers
448 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
1answer
103 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 ...
2
votes
1answer
158 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 ...
0
votes
1answer
69 views

Live Preview is jumping to top of page on edit [closed]

When using the live preview pane, each time I type something or move a block, the preview pane jumps to the top. When editing anywhere but the top, this is not ideal. Is this a bug? I also checked it ...
1
vote
1answer
104 views

How can I set live preview's minimum interval?

New Relic reporting seems to show a strong correlation between the previewEntry method's transactions and a couple of recent apdex-based alerts (the periods indicated by the pink background): (The ...
1
vote
1answer
300 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 ...
2
votes
1answer
530 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 ...
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 ...
4
votes
2answers
614 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 ...
3
votes
1answer
716 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 ...
4
votes
7answers
3k 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 ...