bobbingwide / oik-bob-bing-wide

More lazy smart shortcodes
https://www.oik-plugins.com/oik-plugins/oik-bob-bing-wide-more-lazy-smart-shortcodes/
GNU General Public License v2.0
2 stars 0 forks source link

Improve [bw_plug] when oik-plugins post type defined locally #19

Closed bobbingwide closed 3 years ago

bobbingwide commented 7 years ago

The [bw_plug] shortcode should be improved to provide easier links to a referenced plugin. In a multisite environment it might also be nice if it were able to to detect the 'correct' site.

Also fix...

Warning: Attempt to assign property of non-object in C:\apache\htdocs\wordpress\wp-content\plugins\oik-bob-bing-wide\shortcodes\oik-plug.php on line 241

bobbingwide commented 7 years ago

The changes in 40a7b42 are ok for a simple link to a plugin but not for a table of plugins where we want to see data from WordPress.org. Until the code is implemented using a better class structure a pragmatic solution would be to used the cache method to load data for WordPress or WordPress and oik plugins when the table display is required.

bobbingwide commented 7 years ago

Note: We still get the warning message.

bobbingwide commented 4 years ago

Well, since this issue isn't yet closed I may as well add this new message. It occurs when the locally cached plugin_info is from oik-plugins and doesnt contain a value for downloaded. The following function would appear to need to be improved.

function oikp_get_downloaded( $post, $version ) { 
  return( "" );
} 

or the routine that calls it.

/home/herb/public_html/wp-content/plugins/oik-bwtrace/includes/bwtrace-actions.php(279:2) bw_trace_error_handler(1) 120 3 2020-01-30T15:26:15+00:00 0.227250 0.000205 cf=genesis_loop,genesis_entry_content,the_content 11453 73 20664 29360128/29360128 768M F=887 err W3TC\Generic_Plugin::ob_callback,ob_gzhandler,autoptimizeMain::end_buffering Array

[0] => (integer) 2
[1] => (string) "Warning: number_format() expects parameter 1 to be float, string given"
[2] => (string) "/home/herb/public_html/wp-includes/functions.php"
[3] => (integer) 397

@#:0 337 508

Plugin name and descriptionPlugin linksVersion, total downloads, last update, tested
oik-css
Internal CSS styling
0.9.0

  1. bw_lazy_backtrace /home/herb/public_html/wp-content/plugins/oik-batch/libs/bwtrace.php:108 0
  2. bw_backtrace /home/herb/public_html/wp-content/plugins/oik-bwtrace/includes/bwtrace-actions.php:286 0
  3. bw_trace_error_handler(2,number_format() expects parameter 1 to be float, string given,/home/herb/public_html/wp-includes/functions.php,397,array) /home/herb/public_html/wp-content/plugins/oik-bwtrace/includes/bwtrace-actions.php:0 5
  4. number_format(,0,.,,) /home/herb/public_html/wp-includes/functions.php:397 4
  5. number_format_i18n(,0) /home/herb/public_html/wp-content/plugins/oik-bob-bing-wide/shortcodes/oik-plug.php:794 2
  6. bw_format_plug_table(oik-css,unsupported,object) /home/herb/public_html/wp-content/plugins/oik-bob-bing-wide/shortcodes/oik-plug.php:72 3
  7. bw_plug(array,,bw_plug) /home/herb/public_html/wp-content/plugins/oik/oik-add-shortcodes.php:207 3
bobbingwide commented 4 years ago

Workaround was to delete the transient data cached for the plugin from oik-plugins.com and reset the entry for the plugin.

bobbingwide commented 3 years ago

Problem happened again on oik-plugins.com and oik-plugins.co.uk Time to apply the fix!