Plugin Directory

Changeset 2517296


Ignore:
Timestamp:
04/19/2021 03:13:27 AM (5 years ago)
Author:
Lwangaman
Message:

Update to version 7.5 from GitHub

Location:
bibleget-io
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bibleget-io/tags/7.5/README.md

    r2517191 r2517296  
    1212| Tested up to      | WordPress 5.7.1                                                                                                            |
    1313| Requires PHP      | 5.6                                                                                                                        |
    14 | Stable tag        | 7.3                                                                                                                        |
     14| Stable tag        | 7.4                                                                                                                        |
    1515| License           | GPLv2 or later                                                                                                             |
    1616| License URI       | http://www.gnu.org/licenses/gpl-2.0.html                                                                                   |
     
    118118A word of caution however: the more recent updates to the BibleGet service endpoint have started imposing hard limits on the number of requests that can be issued from any given domain, IP address or referer. No more than 30 requests for one same Bible quote can be issued in a two day period, and no more than 100 requests for different Bible quotes can be issued in a two day period. If you have many Bible quotes on your website and you risk hitting the limit, it may be best not to flush the cache all at once but rather wait out the seven days until the cache expires.
    119119
    120 ### Sometimes the Bible quote block is giving an error 'Error loading block: The response is not a valid JSON response.'
    121 If you sometimes see this error, one possible situation is that the server configuration is not able to handle large GET requests. Since the Bible quote block has many styling options, the function that renders the block every time a change needs to send all of the data from the styling options to the server in order for the render to complete successfully. However requests of type GET only allow for so much data in the request URL. You can check if this is the actual problem you are encountering by opening your browser's Inspector Tools (for example CTRL-SHIFT-I in Google Chrome) and checking if you see a failed GET request by the api-fetch.min.js script to a wp-json endpoint something like this: **/wp-json/wp/v2/block-renderer/bibleget/bible-quote?...**
    122 You can further inspect the *Network* tab of the browser's Inspector Tools (this may require reloading the page and retrying the request). If you see a similar request in the Network tab with a response of '502 Bad Gateway', this could be an indication that your server is hitting the buffer limit for GET requests.
    123 To fix this, POST requests need to be made instead of GET requests, however this functionality has only been introduced in Gutenberg v8.8, released August 19th 2020. Therefore the only way to fix this on a version of WordPress less than 5.6 is to install the Gutenberg plugin with a minimum version of 8.8. For versions of WordPress greater than 5.6 installation of the Gutenberg plugin is not be required.
    124 When having to fix by installation of the Gutenberg plugin, in order to test the fix once the plugin has been installed, open the browser's Inspector Tools, open the *Network* tab, then create a new Bible quote block. You can check the request method used in the request by the `api-fetch.min.js` script to **/wp-json/wp/v2/block-renderer/bibleget/bible-quote?...**, under `Headers -> General -> Request Method`, it should now show `POST`.
    125 
    126120### I'm not able to use some options in the Gutenberg block such as positioning of the Bible version
    127121There was recently an update to the BibleGet I/O API which slightly changed the structure of the html that comprises the Bible quotes. It is necessary to update the plugin to v5.9 in order to be compatible with these changes.
  • bibleget-io/tags/7.5/js/gutenberg.js

    r2517169 r2517296  
    190190  );
    191191
    192   if (BibleGetGlobal.haveGFonts === "SUCCESS" && typeof BibleGetGlobal.GFonts === 'object' && BibleGetGlobal.GFonts.hasOwnProperty('items') && BibleGetGlobal.GFonts.items.length > 0 ) {
     192  if (
     193    BibleGetGlobal.haveGFonts === "SUCCESS"
     194    && typeof BibleGetGlobal.GFonts === 'object'
     195    && BibleGetGlobal.GFonts !== null
     196    && BibleGetGlobal.GFonts.hasOwnProperty('items')
     197    && BibleGetGlobal.GFonts.items.length > 0
     198  ) {
    193199    BibleGetGlobal.GFonts.items.forEach(value => fontOptions.push({ label: value.family, value: value.family.replace(/ /g,"+") }) );
    194200  }
     
    14691475        if ( BibleGetGlobal.haveGFonts === "SUCCESS"
    14701476            && typeof BibleGetGlobal.GFonts === 'object'
     1477            && BibleGetGlobal.GFonts !== null
    14711478            && BibleGetGlobal.GFonts.hasOwnProperty('items')
    14721479            && BibleGetGlobal.GFonts.items.length > 0
  • bibleget-io/trunk/README.md

    r2517191 r2517296  
    1212| Tested up to      | WordPress 5.7.1                                                                                                            |
    1313| Requires PHP      | 5.6                                                                                                                        |
    14 | Stable tag        | 7.3                                                                                                                        |
     14| Stable tag        | 7.4                                                                                                                        |
    1515| License           | GPLv2 or later                                                                                                             |
    1616| License URI       | http://www.gnu.org/licenses/gpl-2.0.html                                                                                   |
     
    118118A word of caution however: the more recent updates to the BibleGet service endpoint have started imposing hard limits on the number of requests that can be issued from any given domain, IP address or referer. No more than 30 requests for one same Bible quote can be issued in a two day period, and no more than 100 requests for different Bible quotes can be issued in a two day period. If you have many Bible quotes on your website and you risk hitting the limit, it may be best not to flush the cache all at once but rather wait out the seven days until the cache expires.
    119119
    120 ### Sometimes the Bible quote block is giving an error 'Error loading block: The response is not a valid JSON response.'
    121 If you sometimes see this error, one possible situation is that the server configuration is not able to handle large GET requests. Since the Bible quote block has many styling options, the function that renders the block every time a change needs to send all of the data from the styling options to the server in order for the render to complete successfully. However requests of type GET only allow for so much data in the request URL. You can check if this is the actual problem you are encountering by opening your browser's Inspector Tools (for example CTRL-SHIFT-I in Google Chrome) and checking if you see a failed GET request by the api-fetch.min.js script to a wp-json endpoint something like this: **/wp-json/wp/v2/block-renderer/bibleget/bible-quote?...**
    122 You can further inspect the *Network* tab of the browser's Inspector Tools (this may require reloading the page and retrying the request). If you see a similar request in the Network tab with a response of '502 Bad Gateway', this could be an indication that your server is hitting the buffer limit for GET requests.
    123 To fix this, POST requests need to be made instead of GET requests, however this functionality has only been introduced in Gutenberg v8.8, released August 19th 2020. Therefore the only way to fix this on a version of WordPress less than 5.6 is to install the Gutenberg plugin with a minimum version of 8.8. For versions of WordPress greater than 5.6 installation of the Gutenberg plugin is not be required.
    124 When having to fix by installation of the Gutenberg plugin, in order to test the fix once the plugin has been installed, open the browser's Inspector Tools, open the *Network* tab, then create a new Bible quote block. You can check the request method used in the request by the `api-fetch.min.js` script to **/wp-json/wp/v2/block-renderer/bibleget/bible-quote?...**, under `Headers -> General -> Request Method`, it should now show `POST`.
    125 
    126120### I'm not able to use some options in the Gutenberg block such as positioning of the Bible version
    127121There was recently an update to the BibleGet I/O API which slightly changed the structure of the html that comprises the Bible quotes. It is necessary to update the plugin to v5.9 in order to be compatible with these changes.
  • bibleget-io/trunk/js/gutenberg.js

    r2517169 r2517296  
    190190  );
    191191
    192   if (BibleGetGlobal.haveGFonts === "SUCCESS" && typeof BibleGetGlobal.GFonts === 'object' && BibleGetGlobal.GFonts.hasOwnProperty('items') && BibleGetGlobal.GFonts.items.length > 0 ) {
     192  if (
     193    BibleGetGlobal.haveGFonts === "SUCCESS"
     194    && typeof BibleGetGlobal.GFonts === 'object'
     195    && BibleGetGlobal.GFonts !== null
     196    && BibleGetGlobal.GFonts.hasOwnProperty('items')
     197    && BibleGetGlobal.GFonts.items.length > 0
     198  ) {
    193199    BibleGetGlobal.GFonts.items.forEach(value => fontOptions.push({ label: value.family, value: value.family.replace(/ /g,"+") }) );
    194200  }
     
    14691475        if ( BibleGetGlobal.haveGFonts === "SUCCESS"
    14701476            && typeof BibleGetGlobal.GFonts === 'object'
     1477            && BibleGetGlobal.GFonts !== null
    14711478            && BibleGetGlobal.GFonts.hasOwnProperty('items')
    14721479            && BibleGetGlobal.GFonts.items.length > 0
Note: See TracChangeset for help on using the changeset viewer.