10up / elasticpress-autosuggest

DEPRECATED - Functionality merged into core ElasticPress plugin
26 stars 7 forks source link

Class EP_ElasticPress not found on activation #6

Open balessan opened 8 years ago

balessan commented 8 years ago

With ElasticPress in its 2.1 version, there is no EP_ElasticPress class bundled.

So, the test on the existence of this class in your plugin is obviously failing, such as it says:

ElasticPress Autosuggest requires ElasticPress; the plug-in has been deactivated.

Even tough I do have ElasticPress installed and activated. Maybe the check should be done on another class ? EP_Config could be a good candidate ? Line 45 of elasticpress_autosuggest.php, first line of the function epas_activate_check() { :

if ( class_exists( 'EP_ElasticPress' ) ) {

On my side, I will only disable the check, as I am overriding a few things anyway...

Cheers,

sblomberg commented 8 years ago

Can confirm that I'm having the same problem activating the plugin as well given the following environment:

WordPress - 4.6.1 ElasticPress - 2.1.1 ElasticPress Autosuggest - 0.1.0

terrence-gonsalves commented 8 years ago

I can confirm this as well with the same versions as sblomberg. A more logical change would be instead of checking if a class exist just checking if the EP plugin is active, is_plugin_active() .

That's the change we made and until an official update is posted we will be leaving it in place.