Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview templates are not rendering #2978

Closed
nelsonreitz opened this issue Dec 18, 2019 · 10 comments
Closed

Preview templates are not rendering #2978

nelsonreitz opened this issue Dec 18, 2019 · 10 comments
Assignees

Comments

@nelsonreitz
Copy link

Describe the bug
Preview templates are not registered/rendering in the content manager. No error is the console or in the manager suggests that the templates are not even registered.

This issue has been experienced by myself in the repo eav-vaud/eav-vd.ch and by @tonyjmartinez in the repo tonyjmartinez/fromwaydowntown

To Reproduce
Try to register a template using the same method as in the Gatsby + Netlify CMS Starter.

Expected behavior
Preview template should render or at least show an error.

Applicable Versions:

  • Netlify CMS version: 2.9.7
  • Git provider: GitHub
  • OS: macOS Mojave 10.14.5
  • Browser version: chrome 79
  • Node.JS version: 12.13.1

CMS configuration
config.yml

Additional context
This issue was discussed in the Netlify CMS Slack and @erquhart suggested we open an issue.

@erquhart
Copy link
Contributor

I cloned your repo and ran it locally, the div with "Test" is output in the preview pane.

Screen Shot 2019-12-20 at 1 34 48 PM

@nelsonreitz
Copy link
Author

Thanks a lot for helping @erquhart! Since you got this behavior I tried to create a new site instance on netlify (with a new url) and got the preview template to render as expected.

However, on my original netlify site (old url), the preview template still doesn't render:
preview-template

Could this be cache related then?

@jl-n
Copy link

jl-n commented Feb 11, 2020

Were you guys able to work out what the issue was? It's looking like I am running into the same issue..

@tomrutgers
Copy link
Contributor

tomrutgers commented Feb 11, 2020

Maybe a serviceworker or aggressive caching causing some trouble? Try clearing your cache settings and unregistering any active serviceworkers

@erezrokah
Copy link
Contributor

Hi @tapjay, can you share your repo? If not a config.yml, any custom previews you're registering and a screenshot will help a lot.
Also, are you experiencing it locally or on the published site?

@jl-n
Copy link

jl-n commented Feb 11, 2020

@tomrutgers I tried doing that again - same result I'm afraid.

@erezrokah Unfortunately I can't share the repo as it is for a client but I am not creating any custom previews. It is just using the Gatsby Netlify template with a subset of what was originally inside the config.yml.

In fact, when I try to view the preview of the index page now, I get the following error in the preview panel:

preview-error-netlify-cms

@nelsonreitz
Copy link
Author

nelsonreitz commented Feb 11, 2020

Found some new info for my initial issue. My preview templates were not updating because I couldn't login on my local netlifycms. Since I was using github auth, I was redirected to the live xxx.netlify.com/admin instance (related to #766 and netlify/netlify-identity-widget#86).

I got my preview templates to behave correctly by using email authentification and the localhost:8000/admin netlifycms instance.

@erezrokah erezrokah self-assigned this Feb 12, 2020
@erezrokah
Copy link
Contributor

@tomrutgers I tried doing that again - same result I'm afraid.

@erezrokah Unfortunately I can't share the repo as it is for a client but I am not creating any custom previews. It is just using the Gatsby Netlify template with a subset of what was originally inside the config.yml.

In fact, when I try to view the preview of the index page now, I get the following error in the preview panel:

preview-error-netlify-cms

Is this the template you're using https://github.com/netlify-templates/gatsby-starter-netlify-cms?

I can see the index page with the latest version of the starter:
image

@tomrutgers
Copy link
Contributor

The preview template probably doesn't match the data defined in config.yml anymore.. If you make changes to the data, you have to update your preview template accordingly @tapjay

@erezrokah
Copy link
Contributor

Closing as the initial issue seems to be resolved. Please open a new issue with relevant information if still happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants