GeoDirectory SupportGeoDirectory not installed – poorly handled – GeoDirectory Support https://wpgeodirectory.com/support/topic/geodirectory-not-installed-poorly-handled/feed Thu, 12 Feb 2026 19:08:25 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/geodirectory-not-installed-poorly-handled/#post-1078 <![CDATA[GeoDirectory not installed – poorly handled]]> https://wpgeodirectory.com/support/topic/geodirectory-not-installed-poorly-handled/#post-1078 Thu, 01 May 2014 04:02:40 +0000 Jeff Hi guys, while updating one of my plugins, I tried deactivating WPGeoDirectory to see how my check worked. I discovered that your add-on plugins are not handling the missing plugin gracefully.


	// First check if geodir main pluing is active or not.
	if (!get_option('geodir_installed')) {
		$error = new WP_Error('broke', __('<span style="color:#FF0000">There was an issue determining where GeoDirectory Plugin is installed and activated. Please install or activate GeoDirectory Plugin.</span>', GEODIRAUTOCOMPLETER_TEXTDOMAIN));
			echo $error->get_error_message();
		die;
	}

This function takes the user to a new page and then DIEs. Leaving them with a blank screen & your error. Clicking back produces the same error again as the function runs again. I got caught in a pretty bad loop this way and had to work hard to get out of it.

Might I suggest something more WordPress-y?


if (!get_option('geodir_installed')) {
    if( !( function_exists('gd_not_installed_error') ) ){
        function gd_not_installed_error(){
            $error = new WP_Error('broke', __('<span style="color:#dd3d36">There was an issue determining where GeoDirectory Plugin is installed and activated. Please install or activate GeoDirectory Plugin.</span>', 'gd-exporter'));
            echo '<div class="error">';
            echo $error->get_error_message();
            echo '</div>';
        }
    }
    add_action( 'admin_notices', 'gd_not_installed_error' );
}
]]>
https://wpgeodirectory.com/support/topic/geodirectory-not-installed-poorly-handled/#post-1079 <![CDATA[Reply To: GeoDirectory not installed – poorly handled]]> https://wpgeodirectory.com/support/topic/geodirectory-not-installed-poorly-handled/#post-1079 Thu, 01 May 2014 04:03:32 +0000 Jeff Noticed that my example isn’t the best either, but at least the user isn’t left dead in the water.

]]>
https://wpgeodirectory.com/support/topic/geodirectory-not-installed-poorly-handled/#post-1080 <![CDATA[Reply To: GeoDirectory not installed – poorly handled]]> https://wpgeodirectory.com/support/topic/geodirectory-not-installed-poorly-handled/#post-1080 Thu, 01 May 2014 04:48:09 +0000 Vikas Hi,

Thanks for highlighting this, I will fix it.

]]>