Closed oldrup closed 8 months ago
One way to mitigate the issue, is to create a pattern of a working Pods block. Then you can insert the pattern, and editing say, short strings in the where clause can be done faster than the editor refreshes.
Good point here, we'll add a better try/catch for the SQL error and avoid this problem.
I wasn't able to get the error to happen itself, but the code I added will catch any other remaining errors that might be happening.
I've made additional adjustments and the errors appear much better now too:
When not using WP_DEBUG:
When using WP_DEBUG:
Description
I'm transitioning from Pods shortcodes to the Gutenberg blocks, enjoying how I can actually see the content within the editor.
However, the rendered block in the editor “crashes” when the parameters for the block aren't completely valid. That is a problem, as the block editor attempts to render the Pods block output while still typing the parameters.
Screenshot 1 - the Pods Item List returns some items, fine.
Screenshot 2 - after starting to type
t.post_title ASC
in theOrder By
I think that affects all the SQL parameters but I specifically experienced it on the limit, where and order by.
The only resort is to exit the editor and cancel saving.
Is that something you can reproduce?
Version
3.0.7
Testing Instructions
No response
Screenshots / Screencast
No response
Possible Workaround
Can be worked around by coping and pasting in a finished where or order by clause from another text editor.
Site Health Information
No response
Pods Package
No response