• Resolved Thomas VanSlambrouck

    (@xplicitcoding)


    Fatal error: Uncaught Error: Call to undefined function get_plugins() in /home/xplicitcoding/public_html/12voltmag/wp-content/plugins/host-analyticsjs-local/includes/class-admin.php:60 Stack trace: #0 /home/xplicitcoding/public_html/12voltmag/wp-content/plugins/host-analyticsjs-local/includes/class-admin.php(35): CAOS_Admin->is_super_stealth_active() #1 /home/xplicitcoding/public_html/12voltmag/wp-content/plugins/host-analyticsjs-local/includes/admin/class-settings.php(105): CAOS_Admin->__construct() #2 /home/xplicitcoding/public_html/12voltmag/wp-content/plugins/host-analyticsjs-local/includes/class-caos.php(103): CAOS_Admin_Settings->__construct() #3 /home/xplicitcoding/public_html/12voltmag/wp-content/plugins/host-analyticsjs-local/includes/class-caos.php(30): CAOS->do_settings() #4 /home/xplicitcoding/public_html/12voltmag/wp-content/plugins/host-analyticsjs-local/host-analyticsjs-local.php(74): CAOS->__construct() #5 /home/xplicitcoding/public_html/12voltmag/wp-content/plugins/host-analyticsjs-local/host-analyticsjs- in /home/xplicitcoding/public_html/12voltmag/wp-content/plugins/host-analyticsjs-local/includes/class-admin.php on line 60

    The page I need help with: [log in to see the link]

Viewing 6 replies - 16 through 21 (of 21 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    @xplicitcoding, @guerrierosilver, @achangeforbetter,

    If any of you would like to leave a review, that’d be much appreciated! ??

    Thread Starter Thomas VanSlambrouck

    (@xplicitcoding)

    Can I ask what was wrong? I like to tinker and figure out how things work, so just curious what broke and what you did to fix it. You can be vague to not release any plugin secrets ??

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    There’s nothing to be vague about. ??

    I added a function which checks if the Super Stealth Upgrade is installed when certain options are changed, and if it isn’t, it throws a notice.

    This function called methods like get_plugins() and is_plugin_active() before plugin.php was loaded.

    But (there’s a but) this only occurs in some configurations apparently. I couldn’t reproduce this on my test site, or on my two (!) production sites. I suspect some plugins alter the loading order of WordPress’ admin files.

    The solution was to optimize the code. I got rid of get_plugins() entirely and created a Polyfill (an alternative function if the original doesn’t exist) for is_plugin_active(). On top of that I hooked it to the ‘plugins_loaded’ action previously, which would make it trigger on every pageload (in the Admin-area), which didn’t make sense at all (Captain Hindsight over here.)

    So, now it’s only triggered when the aforementioned options are actually changed.

    Have fun tinkering! ??

    Thread Starter Thomas VanSlambrouck

    (@xplicitcoding)

    Awesome thank you!

    Could you try the last version (3.4.4). This bug is completely fixed now.

    @daanvandenbergh

    Sorry for the delay, I went to sleep after posting this, It was giving me error on a new installation but not seems work without problems with 3.4.4.

    have you already considered a plugin to locally host recaptcha or is not currently possible?

    Ty so much for your work/plugins

    regards

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    No problem, @zombiemaker.

    Hosting a file locally requires heavy testing, to see if it might break its functionality. I simply don’t have the time to make another plugin.

    Enjoy CAOS! ??

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Fatal Error’ is closed to new replies.