verbb / vizy

A flexible visual editor for Craft CMS
Other
44 stars 8 forks source link

Jumping back a revision makes Vizy unusable - results in JSON #94

Closed mattbloomfield closed 1 year ago

mattbloomfield commented 2 years ago

Description

I was hoping to jump back in time on this page but the vizy block ended up totally borked.

image

Steps to reproduce

  1. Create a vizy field
  2. Add it to an entry type
  3. Publish it
  4. Make changes, publish again
  5. Try to jump back a revision
  6. In the revision viewer it looks good!
  7. Once you apply the revision, it comes back as JSON.

Additional info

Additional context

mattbloomfield commented 2 years ago

I wanted to add that it also kills the frontend. Luckily I did this in dev but if I had tried in production my site would be irreversibly borked unless I did an actual database recovery.

engram-design commented 2 years ago

I can't reproduce this one sorry, strange. Did you make any changed to the field between applying revisions? There's likely a JS error on the page, and too late to look at what it was now.

If you're able to reproduce it again (locally - ideally) I'd love to get some more information about the error. Or, if you're able to send through the JSON content from the content database table for that field. It may very well be a combination of your block types, fields or content.

mattbloomfield commented 2 years ago

Weird... I should have tested this a few more times perhaps. I just tried to recreate it locally and didn't get the same issue (https://www.loom.com/share/e22dfb76bd0546ab9983867fef7e9bb4?from_recorder=1&focus_title=1)

So... I'm happy to be wrong! Hopefully this doesn't bite us going forward.

Love Vizy btw! We were nervous to use it as it was pretty new when we started building our site (early summer 2021) but man, it's killer! It supports almost all of uschamber.com at this point.

engram-design commented 2 years ago

Hmmm, I'll continue to test a few more scenarios, fields and block configurations just to be sure. I'm wondering if the entry in your video was the exact same one with the issue in the first place? I wonder if a max_post_size or max_input_vars limit might've been hit, as your entry content does look quite large?

Thanks for confirming, and glad you are liking it!

mattbloomfield commented 2 years ago

I thought about that as well - typically when I've seen that on other sites you get a CraftCMS error in the network tab... But it's true we haven't bumped that beyond the standard for this site. If I see it again I'll let you know.

And yes, it was this entry. It's our homepage and is quite large.

mattbloomfield commented 2 years ago

Posting here as I am seeing the JSON again. This time there was no revision restore, but I did catch the console errors if helpful. image

engram-design commented 2 years ago

Is that a consistent error, or just happens sometimes? Understood you haven't reverted to a revision, just loading the page.

mattbloomfield commented 2 years ago

In this case it came up randomly, but persisted with each page load. Not sure of the cause but it left me totally blocked. Luckily it was a Dev environment so nbd

engram-design commented 1 year ago

Closing due to age and unable to reproduce.