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

Netlify error when viewing incident: layoutPostDateEnd.getYear is not a function #63

Closed
pauby opened this issue Mar 19, 2019 · 6 comments
Labels

Comments

@pauby
Copy link
Contributor

pauby commented Mar 19, 2019

Describe the bug
When viewing an incident the following error is displayed in the right hand pane:

Error
There's been an error - please report it.

Details
TypeError: layoutPostDateEnd.getYear is not a function

I'm not sure at this stage what it affects but it says it's to be reported.

Reproduction steps
Steps to reproduce the behavior:

  1. Login in to the site on Netlify;
  2. View an existing (resolved in thsi case) incident

Expected behavior
No error to appear.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chromium
  • Version 73.0.3683.75
@pauby
Copy link
Contributor Author

pauby commented Mar 19, 2019

Is this perhaps related to #57 (I didn't add to that as it was a slightly different error).

@mistermantas
Copy link
Member

It's related but not the same. It pertains to the way the preview is rendered. There's a JS check that gets the date and tries to simulate what the live site would look like. I'll try to get a better fix in place since this has been an ongoing issue ever since I introduced those new previews

@mistermantas
Copy link
Member

The dev branch doesn’t have this code (apparently I had fixed this before lol) so I’ll close this issue and I can reopen it if things still aren’t working. 🙂

@pauby
Copy link
Contributor Author

pauby commented Apr 12, 2019

This is still an issue with 3.0.1.

image

@mistermantas
Copy link
Member

@pauby least it's a different issue!

what you can do now as a stopgap is go into static/admin/index.html and get rid of the <script> tag(s) with this custom preview code in it cause you should only really need the <script src ones for the CMS to work.

I'll try setting this up again another week, right now I'm going on a trip. I've likely implemented the dates wrong and why they were working locally for me is a mystery at this point.

@pauby
Copy link
Contributor Author

pauby commented Apr 28, 2019

@mistermantas I just wanted to come back here to say this is fixed now. Thank you for your time on this. It is very much appreciated!

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

No branches or pull requests

2 participants