statamic-rad-pack / runway

Eloquently manage your database models in Statamic.
https://statamic.com/runway
MIT License
107 stars 43 forks source link

Revisions status isn't correct #551

Closed edalzell closed 1 week ago

edalzell commented 2 weeks ago

Description

I have a resource where revisions are enabled. There IS a saved version in the db, then I made a small change and clicked Saved Changes.

I see this: CleanShot 2024-07-04 at 17 09 30@2x

I don't believe it should say This is the published version. In Statamic collections it has this: CleanShot 2024-07-04 at 17 12 13@2x

Steps to reproduce

  1. enable revisions in a resource
  2. in an existing model (i.e. not a new one), edit something
  3. Click Save changes

Environment

Environment Application Name: Zakat Foundation of America Laravel Version: 11.14.0 PHP Version: 8.3.8 Composer Version: 2.7.7 Environment: local Debug Mode: ENABLED URL: zakat.test Maintenance Mode: OFF Timezone: America/Los_Angeles Locale: en

Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED

Drivers Broadcasting: null Cache: file Database: mysql Logs: stack / daily Mail: smtp Queue: sync Session: file

Livewire Livewire: v3.5.2

Statamic Addons: 13 Sites: 3 (zakat.org (EN), zakat.org (AR), zfinstitute.com (ZFI)) Stache Watcher: Disabled Static Caching: Disabled Version: 5.12.0 PRO

Statamic Addons aryehraber/statamic-captcha: 1.12.0 edalzell/forma: 3.0.1 jacksleight/statamic-bard-mutator: 2.3.1 jacksleight/statamic-distill: 0.7.2 jonassiewertsen/statamic-livewire: 3.6.0 statamic-rad-pack/runway: dev-fix/has-many-revisions statamic/seo-pro: 6.0.3 transformstudios/events: 5.4.3 transformstudios/front: 3.0.1 transformstudios/github: dev-main transformstudios/neon: dev-feature/ai-updates transformstudios/review: 5.0 transformstudios/simple: 5.1.10

duncanmcclean commented 1 week ago

Hmm, I can't seem to reproduce this on my end 🤔

"This is the published version" only shows for me before I make any changes or after I hit publish on my changes, the same behaviour as on core.

https://github.com/statamic-rad-pack/runway/assets/19637309/f5067d8e-89a6-4c1b-8f11-2f9ecd21b086

When I edit a model with no previous revisions, I see "Model has not been published" up until the revision is published.

edalzell commented 1 week ago

Make a change, click Save Changes, then reload the page.

duncanmcclean commented 1 week ago

Oh, I see it now, thanks!