Some people may find that the Gutenberg block doesn’t render and see instead an error message along the lines of “Error loading block: The response is not a valid JSON response.”
I have pinpointed what is causing this, and unfortunately it is not a problem with the BibleGet plugin, but it is rather a limitation of the current Gutenberg blocks that is being dealt with.
The technicality of the problem is that the BibleGet “Bible quote” block uses ServerSideRender to render the block, seeing that communication with the BibleGet service endpoint is better done server side. The current ServerSideRender logic only utilizes GET requests to send all the attributes that are being set by the block to the server side code. Which means that blocks that have a lot of attributes, will be sending a lot of parameters in URL query, to the point that it is too much to handle (there are limits on the size of a URL request).
Which means that either communication cannot be completed with the server side code, or is being truncated. And everything goes haywire.
The solution to this problem is to allow POST requests to the server side code, which allows parameters to be sent in the body of the request rather than in the URL, and the request body allows for more data than the URL does. There is currently a proposed fix for this on the Gutenberg development repository: https://github.com/WordPress/gutenberg/pull/21068 . However I’m not sure how or when this fix will be implemented.
In the meantime, the only way to get the Gutenberg block to work would be to change the settings on your server to allow for larger URLs in GET requests. For example, on an NGINX server, you would need to increase the proxy_buffer_size
(see for example this thread: https://talk.plesk.com/threads/fpm-buffer-settings-and-proxy-buffer.344813/ ).
So until an update is made to the WordPress Gutenberg block editor with this fix, you will either have to change your server settings to accomodate for larger GET requests, or you’ll just have to sit tight until a the block editor gets an update with this fix.
]]>If you have experienced some issues with getting the more recent updates to the plugin to work with Bible quotes that you already have in your pages or articles, the situation should sort itself out within a week. This is what is happening and how you can fix it without waiting a week:
Since more than two weeks have passed since the updates that caused these issues were published, this is most likely no longer a problem (as of time of writing = June 18 2020).
]]>The server that the BibleGet project is hosted on is currently undergoing maintenance. There was a scheduled upgrade of the server instance by the provider (OVH) however there seems to have been some trouble in the automatic migration, and the OVH technicians must manually complete the process. In the meantime, the server along with the websites and services hosted on the server are all down.
The BibleGet service endpoint query.bibleget.io is still available since it is using a backup instance on Amazon Web Services, however the backup instance doesn’t have the latest updates to the service endpoint engine which are required by the more recent updates to the WordPress plugin. Other plugins which request the json format will probably not be affected, however the BibleGet plugin for WordPress will be affected. So please just sit tight until maintenance has completed, as soon as I have a status update I will post it here.