Viewing 5 replies - 1 through 5 (of 5 total)
  • Damon Cook

    (@colorful-tones)

    Yep, the latest update took down my client’s site with same error on WPEngine. Please advise.

    Thread Starter Kishor Thanth

    (@kishorwpmaintain)

    @colorful-tones For now I have commented the 3 lines of code: (line no 145 to 147) But make sure you have “mod_rewrite” rule is enabled on the server.

    Filename: wp-content/plugins/weglot/bootstrap.php

    `// if (function_exists(‘apache_get_modules’) && !in_array(‘mod_rewrite’, apache_get_modules())) { //phpcs:ignore
    // add_action(‘admin_notices’, array(‘\WeglotWP\Notices\Rewrite_Module_Weglot’, ‘admin_notice’));
    // }’

    The above code only checks if “mod_rewrite” is enabled or not. and in WPEngine it is enabled by-default as i checked with the support person.

    Damon Cook

    (@colorful-tones)

    @kishorwpmaintain Your patch worked like a charm (commenting out). I’ll keep an eye out for a stable update for plugin. Thanks!

    Thread Starter Kishor Thanth

    (@kishorwpmaintain)

    another fix!!

    replace on Filename: wp-content/plugins/weglot/bootstrap.php
    Line No: line no 145 to 147
    FROM

    if (function_exists(‘apache_get_modules’) && !in_array(‘mod_rewrite’, apache_get_modules())) { //phpcs:ignore
    add_action(‘admin_notices’, array(‘\WeglotWP\Notices\Rewrite_Module_Weglot’, ‘admin_notice’));
    }

    TO

    if (function_exists('apache_get_modules') && is_array(apache_get_modules())) { //phpcs:ignore
    		if(!in_array('mod_rewrite', apache_get_modules())){
    			add_action('admin_notices', array('\WeglotWP\Notices\Rewrite_Module_Weglot', 'admin_notice'));
    		}
    	}
    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi,

    sorry for the issue you’re facing. We’ll deploy a 3.7.2 plugin version this morning

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘apache_get_modules() is not working for me on wpengine hosting’ is closed to new replies.