-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
Entry breaks if the blueprint does not exist #3920
Comments
This PR is great and will make the error much more clear. Thanks @duncanmcclean and @jasonvarga for the work! Throwing an exception would still mean, that the control panel would break. (No doubt that the PR is helpful). What would be necessary to offer a solution as mentioned in
|
Implementing 1 and 2 are significantly more work, as you've got to find all the entries/taxonomies etc using the blueprint and replace them. Throwing an exception is the quickest way to fix it. It also helps with the case that someone makes a typo when manually setting a blueprint on an entry. |
Important things first: Thanks for the PR and it's great that it has been merged. This is a nice improvement. I am totally aware of the work, but do think that showing a 500 error is not a user-centric way of handling errors, if a plain user can trigger this kind of exception by using the cp (and he can). |
How can a user trigger this error through the CP? You can't change blueprint handles in the CP. You can delete them, I suppose, but someone with permission to manage fields should probably know that deleting something is dangerous. If you'd like to open a feature request in statamic/ideas for the extended solutions you mentioned, that's cool. 👍 |
If trying to open an entry with a non existing blueprint due to renaming etc, we do get a 500 Error in the cp.
How to reproduce
Expectations
I would hope for better error handling, in case we do open an entry with missing/wrong or outdated information.
What I would wish for (ordered after priority)
One and two would be user friendly, making the cp bulletproof.
Environment
Statamic version: 3.1.24 Pro
PHP version: 8.0.6
The text was updated successfully, but these errors were encountered: