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

'Published' toast is shown when returning false from EntrySaving listener #10190

Open
simonerd opened this issue May 24, 2024 · 0 comments · May be fixed by #10263
Open

'Published' toast is shown when returning false from EntrySaving listener #10190

simonerd opened this issue May 24, 2024 · 0 comments · May be fixed by #10263

Comments

@simonerd
Copy link
Contributor

Bug description

In a collection with revisions enabled, the "Published" toast message is shown even then an EntrySaving listener returned false and therefore prevented the entry from actually being saved. This behaviour was fixed for non-revision entries in #9040.

How to reproduce

Fresh install, activate pro + revisions, config a collection to use revisions. Create and register an EntrySaving listener that simply returns false. Try to publish an entry that is currently unpublished.

Expected behaviour:
The publish sidebar closes and a toast appears letting me know that the entry could not be published. Nothing else changes.

Actual behaviour:
The publish sidebar closes and a toast appears letting me know that the entry was successfully published. The published indicator next to the title headline is now green. When refreshing the site, the entry is still unpublished, the indicator is grey again.

Logs

No response

Environment

Environment
Application Name: Statamic
Laravel Version: 10.48.11
PHP Version: 8.2.19
Composer Version: 2.6.6
Environment: local
Debug Mode: ENABLED
URL: statamic4.test
Maintenance Mode: OFF

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

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 0
Antlers: runtime
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.x-dev PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants