I have found the problem and have a workaround solution for the Bloom eMail Opt-In plugin, but the Bloom folks need to come up with a permanent solution since doing this custom workaround solution would not be practical if this same problem is occurring on many/all other WordPress plugins.
The BPS plugin is calling a custom instance of TinyMCE using the wp_editor() function on the Maintenance Mode page:
<?php wp_editor( stripslashes( htmlspecialchars_decode( $MMoptions['bps_maint_text'], ENT_QUOTES ) ), 'bpscustomeditor' ); ?>
Source Code of the Maintenance Mode page showing the BPS plugin custom instance of TinyMCE:
mceInit: {'bpscustomeditor':{theme:"modern",skin:"lightgray",language:"en",formats:{
Bloom is hooking into ALL instances of TinyMCE instead of selectively hooking into ONLY WP default instances of TinyMCE. ie any other plugin that has created a custom instance of TinyMCE will most likely experience the same problem of Bloom hooking into that custom instance of the TinyMCE editor.
Source Code of the Maintenance Mode page showing Bloom hooking into the BPS plugin custom instance of TinyMCE:
external_plugins:{"bloom":"http:\/\/demo5.local\/wp-content\/plugins\/bloom\/js\/bloom-mce-buttons.js","anchor":"http:\/\/demo5.local\/wp-content\/plugins\/tinymce-advanced\/mce\/anchor\/plugin.min.js", ... ... ... tinyMCEPreInit.load_ext("http://demo5.local/wp-content/plugins/bloom/js", "en"); tinymce.PluginManager.load("bloom", "http://demo5.local/wp-content/plugins/bloom/js/bloom-mce-buttons.js"); tinyMCEPreInit.load_ext("http://demo5.local/wp-content/plugins/tinymce-advanced/mce/anchor", "en");
This problem is trickier and the question needs to be asked: should Bloom be hooking into other plugins custom instances of TinyMCE or not or should Bloom ONLY be hooking into WP Default instances of TinyMCE: Post page, Page page and other WP pages ONLY. My assumption is that Bloom will cause this same TinyMCE problem for other plugins and should ONLY be hooking into WP Default instances of TinyMCE. BUT the other side of that is that the Bloom code is intended to add a Bloom button to the WP Editor Toolbar so let’s say you wanted to add an opt-in to the BPS Maintenance Mode page. In theory if the Bloom button and code was not breaking the BPS custom instance of the TinyMCE editor then the Bloom button would be added successfully and you would be able to use it in BPS Maintenance Mode to add an opt-in form on your Maintenance Mode page.
In this particular case this is the most logical workaround solution: Since Bloom is breaking the BPS custom instance of TinyMCE on the BPS Maintenance Mode page and since you really do not need to have a Bloom button (it is a convenience and not a necessity) on the WP Editor toolbar (you can add the Bloom code/shortcode manually) then the best solution would be a custom solution for now. In the long term what really needs to happen is that the Bloom plugin needs some additional coding work to find out why it is causing the custom instance of TinyMCE to be broken. The Bloom folks can test with the BPS free version since the BPS free and Pro versions use the same Maintenance Mode feature and code.
Workaround Solution: Add a custom workaround conditional wrap that says to NOT hook into/load these filters on any BPS plugin pages.
Note: This is a custom solution and is specific to fixing the direct Bloom|BPS plugin issue/problem.
File: /bloom/bloom.php
Code Line: 322
function add_mce_button_filters() { if ( ! preg_match( '/page=bulletproof-security/', esc_html($_SERVER['REQUEST_URI']), $matches) ) { add_filter( 'mce_external_plugins', array( $this, 'add_mce_button' ) ); add_filter( 'mce_buttons', array( $this, 'register_mce_button' ) ); } }