bradyvercher / gistpress

WordPress plugin to add Gist oEmbed and shortcode support with caching.
GNU General Public License v2.0
143 stars 28 forks source link

Plugin throws fatal error when used with WP-CLI #61

Closed salcode closed 8 years ago

salcode commented 8 years ago

thrown in /vagrant/www/salferrarello/htdocs/wp-content/plugins/gistpress/gistpress.php on line 63 Fatal error: Uncaught Error: Call to a member function set_logger() on null in /vagrant/www/salferrarello/htdocs/wp-content/plugins/gistpress/gistpress.php:63

To recreate this error

  • using an installation with WP-CLI available (e.g. in VVV)
  • install and activate the gistpress plugin
  • from the command line (within VVV if that is the environment you're using) run wp

I experienced this error on my Siteground account and on my local installation.

bradyvercher commented 8 years ago

Thanks for the report, @salcode. Explicitly declaring the main instance variables as global seems to fix that. Can you give it a shot and let me know if that clears it up for you?

salcode commented 8 years ago

@bradyvercher

Perfect. Branch develop now works great with WP-CLI.

Thank you for the ridiculously quick fix. You rock.

bradyvercher commented 8 years ago

No problem, @salcode. I pushed out a new release yesterday, so this should be good to go. Thanks for the report!

GaryJones commented 8 years ago

I pushed out a new release yesterday

You only tagged - GitHub doesn't consider that a release. See the green "Latest Release" on the Releases page is next to 2.0.3.

bradyvercher commented 8 years ago

I don't usually use the GitHub Releases feature, so the latest tag is usually the latest release. Are there any package managers that use the Releases feature?

GaryJones commented 8 years ago

I think I've found that GitHub Updater doesn't seem to show the 3.0.0 - or maybe I didn't test well enough. Either way, it won't hurt to use it.

Or maybe I thought it was on the WP repo, and wondered why the 3.0.0 update hadn't come through.