JeffCleverley / NginxFastCGICachePurger

or the Nginx Helper Plugin Helper Plugin :P
GNU General Public License v2.0
22 stars 3 forks source link

Fatal Error upon activating the plugin with Bedrock WordPress stacks #1

Closed abdusfauzi closed 5 years ago

abdusfauzi commented 5 years ago

Upon activation, I got Fatal Error notification from WordPress plugin dashboard:

Fatal error: Uncaught Error: Call to undefined function Nginx_FastCGI_Cache_Purger() in .../web/app/plugins/NginxFastCGICachePurger-master/src/class-nfcp.php:57 Stack trace: 
#0 .../web/app/plugins/NginxFastCGICachePurger-master/nginx-fastcgi-cache-purger.php(68): require() 
#1 .../web/app/plugins/NginxFastCGICachePurger-master/nginx-fastcgi-cache-purger.php(80): autoload_files() 
#2 .../web/app/plugins/NginxFastCGICachePurger-master/nginx-fastcgi-cache-purger.php(82): launch() 
#3 .../web/wp/wp-admin/includes/plugin.php(1897): include('/home/runcloud/...') 
#4 .../web/wp/wp-admin/plugins.php(178): plugin_sandbox_scrape('NginxFastCGICac...') 
#5 {main} thrown in .../web/app/plugins/NginxFastCGICachePurger-master/src/class-nfcp.php on line 57

https://github.com/JeffCleverley/NginxFastCGICachePurger/blob/14c311e7e6932f2e9c94aab96e68ad41072407ae/src/class-nfcp.php#L57

JeffCleverley commented 5 years ago

I don't have anything bedrock to test on, and I apologise for this error, carelessness on my part to just get it out.

I have the plugin working on hundreds of sites right now with GridPane so it should work regardless of Bedrock as it really is just wrapping around curl calls, but I removed and renamed all functions to not mention our stack specifically, as we want this to be a community project and I just knew I would have missed some - should've tested.

I believe @icodus Wiktor has isolated the issue and the merged PR should fix this.

I tested the plugin on the GridPane stack just now with the fix and it is working for me.

abdusfauzi commented 5 years ago

No apology needed. Just wanted to report and issue incase you missed it. Totally understand your position.

Saw that PR too. Will try again later. 💪🏻