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

Bug: Publish date on website homepage is one month earlier than specified in Notion database, when it is set to be the first day of any month #604

Open
powersagitar opened this issue Mar 18, 2024 · 2 comments

Comments

@powersagitar
Copy link

powersagitar commented Mar 18, 2024

Please refer to #604 (comment) for the bug per se and steps to reproduce.

The issue is present in this revision: https://github.com/transitive-bullshit/nextjs-notion-starter-kit/tree/0e40674e88f8429fbb136d032ae77be17f1bda9c (the main branch at the time of writing)

@araza95
Copy link

araza95 commented Apr 15, 2024

@powersagitar , Hi, I hope you are doing well. I would like to fix this bug for you.

Can you elaborate on the issue, specifically regarding how the published date is processed and displayed? Also, could you please provide steps on how to reproduce this bug?

Understanding the underlying cause and reproduction steps will help me propose an effective solution. Thank you!

@powersagitar
Copy link
Author

Hi @araza95, thank you for your interest.

Steps to Reproduce

  1. Duplicate the Notion template
  2. Change the Published field of one of the posts to February 1, 2024
  3. Publish Notion page to web
  4. Checkout main branch of this repo
  5. Adjust rootNotionPageId in site.config.ts accordingly
  6. Run yarn to install dependencies, yarn dev to start a development server

The Bug

  • After going through above steps, you should be able to observe an unhandled runtime error, suggesting that text content does not match server-rendered URL
    • The error is gone after changing the Published field to any date that is not the first day of a month
  • As per my findings the cause is that the publish date on the bottom left corner of the blog posts on website homepage does not match the one you entered on Notion
    • Remember you set the Published field to February 1, 2024 in step 2, but on the homepage it appears to be Jan 1, 2024, which is one month earlier.
  • The bug is present regardless of the month as long as the day is the first day of the month
  • If Published is set to January 1, 2024, the publish date on the website homepage becomes Dec 1, 2024

Please let me know if more clarification is required. :)

@powersagitar powersagitar changed the title Bug: Published date is one month earlier than actual when it's the first day of the month Bug: Publish date on website homepage is one month earlier than specified in Notion database, when it is set to be the first day of any month Apr 15, 2024
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

2 participants