2

Okay, first I know this question has been asked - specifically here: Live preview not automatically updating

But that suggestion did not help. I have no console errors, no network errors. In fact, when I view the network tab in Chrome I can see it successfully POSTing the changes as I type in live preview mode. I have this set up on MAMP using craft.dev as the hostname.

I tried this in both Chrome and FireFox with no luck, as well as trying a fresh install of Craft with no success.

Any thoughts are greatly appreciated on what the issue might be.

Thanks.

2

Okay, so I figured this out and its a very stupid twig template noob mistake on my part.

The mistake is this:

I had a section called 'demo' with a field called 'demoField' and created a template folder called 'demo' with an index.html file inside. The mistake is that my template had this:

{% for entry in craft.entries.section('demo').find() %}
    {{ entry.demoField }}
{% endfor %}

Looking at it now, this won't work, but simply {{ entry.demoField }} will work.

It threw me off because it was still showing the content in the template and saving it to the database, but the live preview would simply not work.

Quite a silly mistake, but just starting out I completely missed this. Hopefully this will help someone in the future.

1

May be because Craft CMS uses gulp for compiling the SASS and js and minimizes it ultimately. So you need too follow some steps,

1). Install gulp locally or globally(recomended),

sudo apt-get install gulp -g or sudo npm install gulp --save

2). Need to run and make build everytime you change the CSS or JS files.

gulp build

3). Or optionally gulp can track all the changes real time.

gulp watch

hope this will help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.