MMR is designed to only work on the frontend so it shouldn’t affect your backend plugins. What are the plugins that your having trouble with?
Our users use a Visual Content Editor plugin called MotoPress. Also, when previewing a page or post while logged in show MMR in action. We do not cache any pages for logged in users and we have verified the pages we are looking at are not cached.
Maybe instead of front-end/back-end checking if option could exist where (if user/admin logged in then disable rewrite). Sometimes plugins operate on pages as they are meant to be rendered.
public function disable_mmr() {
// DISABLE MMR FOR LOGGED IN ADMIN USERS
if ( current_user_can( 'administrator' ) ) {
define( 'DONOTMMR', true );
}
}
Ahh, I see your point. Are you able to try the following code in merge-minify-refresh.php:
if(is_admin() || current_user_can( 'administrator' )) {
on line 86
I wonder if there is a way to detect if motopress is in edit mode. If so we could just disable MMR in that case.
Maybe we could check for the existence of the motopress-ce-auto-open=true parameter?
I tried both suggestions by adding to the if on line 86 without resolve. It’s strange because even just viewing a page while logged in we see the mmr generated files, however, none of them have the “min” in the filename.
When browsing the same page while not logged in we see the “min” in the filename. It’s as though the plugin disables some of the functions (if admin is detected) of mmr not but all of them.
Hello @launchinteractive and @bfsworks
We’d rather recommend to check for the following parameter ‘motopress-ce=1’. It is sent when user launches visual builder to edit the post type.
Hi @bfsworks & @motopress,
We’ve just released version 1.8 of MMR that should now fix this issue. We discovered that MotoPress was enqueuing php files and we now check for this. No need to use the motopress-ce parameter.