Support » Plugin: Events Manager » fatal error when activating plugin

  • Resolved nicoblue

    (@nicoblue)


    Whenever I try to activate either the Events Manager or this similar plugin, I get:

    Fatal error: Call to undefined function get_home_path() in …/wp-admin/includes/misc.php on line 128

    I had Events Manager working fine until a while ago. Then tried to update to wp 3.6 and got the fatal error above for the first time. Rolled back to 3.5.2 manually, now I can’t activate the plugin anymore.

    I’m on wp 3.5.2 with Buddypress 1.7.3 installed. Using a child theme with a simple layout.css file and header.php.

    What I have tried so far:
    – a manual re-install of wordpress via FTP
    – manual re-install of buddypress
    – reverting to default Twenty Eleven theme
    – disabling all other plugins

    Is it just a coincidence that the two plugins work with scheduled events? Could it be a time format issue?

    http://wordpress.org/plugins/events-manager/

Viewing 5 replies - 16 through 20 (of 20 total)
  • For the developer of EM.
    Since we have “green light” in another discussion thread for the fix in v1.3.

    In case you have the same error with other plugins, maybe you should also add the following in your plugin (don’t know the exact location, you should put it), since you also use functions which are using get_home_path.

    // Makes sure the get_home_path function is defined before trying to use it
            if (!function_exists('get_home_path')) {
                require_once( ABSPATH . '/wp-admin/includes/file.php' );
            }

    Thanks for letting us know Lena!

    Plugin Author Marcus

    (@netweblogic)

    Hey @lenasterg, thanks for updating the thread, much appreciated.

    It’s been on my ‘to debug’ list for a while, glad I can cross it off 😉

    Not specific to this plugin but lenasterg’s code helped me while developing a site. It didn’t occur to me that get_home_path() was in a /wp-admin/ file, which are not included by default on the front end. I think the codex could be more clear about this.

    @valerio_cas, I’m glad I helped you!!!

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘fatal error when activating plugin’ is closed to new replies.