notum-cz / strapi-plugin-content-versioning

This plugin enables content versioning in Strapi
129 stars 46 forks source link

Single Type White Page #177

Closed adamrpostjr closed 7 months ago

adamrpostjr commented 9 months ago

Bug report

White Page when Versioning is turned on for single type

Describe the bug

When editing a single type on the latest version of strapi, the page is all white and the error message in the console is: main.0c57bcbc.js:2444 RangeError: Invalid time value image

When I disable versioning, everything is fine.

Steps to reproduce the behavior

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Code snippets

If applicable, add code samples to help explain your problem.

System

Additional context

Add any other context about the problem here.

adamrpostjr commented 9 months ago

The offending line is:

admin/src/componets/Versions/index.js:188 {format(parseISO(initialData.createdAt), "MMM d, yyyy HH:mm")}

ruckerzerg commented 9 months ago

Can confirm, same issue for me.

navneetset commented 8 months ago

Can further confirm, same issue for us as well.

On Strapi 4.20.0

millsoft commented 8 months ago

Can confirm on latest version of Strapi.

edgardz commented 8 months ago

Same here.

alexzhangreslv commented 8 months ago

I have submitted a pull request #189 to fix this issue. This issue occurs since Strapi v4.17.1 where isCreatingEntry will always be false and thus this line {format(parseISO(initialData.createdAt), "MMM d, yyyy HH:mm")} will always be triggered even if initialData is empty.