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

Add more graceful mysql error handling in BB interface #92

Open
nicdford opened this issue Oct 17, 2018 · 1 comment
Open

Add more graceful mysql error handling in BB interface #92

nicdford opened this issue Oct 17, 2018 · 1 comment

Comments

@nicdford
Copy link
Contributor

nicdford commented Oct 17, 2018

Issue Overview

Currently if you have a mysql error, like trying to set a where statement in the pods widget (for instance), it will just lock up the entire page if you save the changes. The only way to fix the issue is to roll-back the page using page revisions.

Work Around

For anyone who might find this and be having the same issue, if you don't save the page itself and just discard your changes, you can bypass having to revert the page version. This might seem obvious, but if you rely on the "live loading" built-in to beaver builder, you can assume its not working (if you're values don't show up) and discard and start the changes over. This assumes you don't have a bunch of other changes you made that are going to get lost... TL;DR if you're uncomfortable with where statements, publish the page before adding any mysql values, so you don't lose your work.

Possible Solution

I'm not sure if its possible to hook into the safemode query param, but if it is, we could theoretically run add_filter( 'pods_error_die', '__return_false' ) as well so if users are having mysql errors, they'd at least be able to get into the module to remove the broken values and try again

Steps to Reproduce (for bugs)

  1. create pods widget
  2. put invalid statement into where field
@nicdford
Copy link
Contributor Author

nicdford commented Oct 17, 2018

Also, in my opinion, this is really only an issue in BB, because it relies on the live reload functionality. If it were a normal PHP template, it would just error and you could modify it in your PHP file and resume development, but in BB it just gets locked up without a great way to revert the change. Although this isn't strictly a "beaver themer" related issue either... so i'm not sure the best place for it.

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

No branches or pull requests

1 participant