Open eshaben opened 1 year ago
Hi @eshaben ,
Thanks for reporting. Definitely something wrong here.
The difference between last modified and creation date in commands is only very small:
That translates to:
git log --date=unix --format=%at -n=1 --diff-filter=A <filepath>
git log --date=unix --format=%at -n=1 <filepath>
Could you have a look for one of the pages and run those two commands? I wonder if the first command return something empty or an error..
You're probably not the only one, so keen to figure this one out :)
Thanks for the response! 🙂
Sure. This is one of the pages we're getting this error on: https://github.com/PureStake/moonbeam-docs/blob/master/builders/build/eth-api/dev-env/scaffold-eth.md
When I run git log --date=unix --format=%at -n 1 --diff-filter=A -- builders/build/eth-api/dev-env/scaffold-eth.md
I get 1646250817
Then when I run git log --date=unix --format=%at -n 1 -- builders/build/eth-api/dev-env/scaffold-eth.md
I get 1673346506.
@eshaben - Did you figure out your issue? I'm encountering the same thing, even though I do have git logs for the file in question.
@karlgo I implemented a workaround. Created a script that checks if the created data is after the last updated date, and, if so, changes the created date to be the same as the last updated. For reference: https://github.com/moonbeam-foundation/moonbeam-docs/blob/master/js/fixCreatedDate.js
I'm experiencing an interesting issue where I get the following error for a few of the pages of the documentation site I am working on:
Then when I view the pages it shows the last modified date correctly, but for the created date, it shows the current date. For example:
I think if there are no logs found for the created date, it should default to the last update date if available.
It'd also be nice to know the underlying reason why it can't find the git logs for when these pages were created, if you have any ideas?