I installed

I installed the 'Support' plugin on my website today. I am experiencing an issue, however.

Everything appears to be functioning properly except the FAQ's page. When I create an FAQ and write in the 'answer' box, it is only visible in the 'Text' mode. When I click on the 'visual' box it is blank. Click back to the 'text' view and it is gone as well. I have to reload the page in order to see it again in the text view.

When I publish the FAQ it is blank. The FAQ page shows nothing.

  • Oguz

    Hey Mike ,

    Hope you're well today.

    I tested the plugin on my test environment and it works as expected. So maybe there is plugin conflict issue on your website. Can you try plugin conflict test? You can learn how to do that from this page. You just need to deactivate all the plugins and activate them one by one. So you can understand which plugin cause this error. Be sure you have a backup before any testing.

    Cheers!
    Oguz

  • Kasia Swiderska

    Hello Mr Fox,

    While checking other issues you reported in another thread ( https://premium.wpmudev.org/forums/topic/difficulty-with-wpmu-dev-plugins ) I also checked problem with Supports FAQ. I will answer here as this where it was originally reported.

    So in case of Support vs VC: it is not the conflict with VC but with JetPack. There is problem with module that adds Contact Form button to toolbar in editor. On FAQ page it throws this error in browser console:

    Uncaught ReferenceError: grunionEditorView is not defined

    Sadly, that module can't be disabled in JetPack, nor I was able to disable it with code snippet I found.
    In this case I will report this to our Second Line Support Developers to investigate this and check if they can provide any workaround that would disable this button on FAQs page, so error will not be generated.

    kind regards,
    Kasia

  • Lindeni Mahlalela

    Hello Mr Fox,

    I hope you are doing great today. Thank you for contacting us and for waiting as we were looking into this.

    I have checked the issue by installing the plugins on my own site, I could replicate the issue and as my colleague Kasia has said, the issue is with the Jetpack Contact Form module. I looked and searched around the internet and I found that it is a known problem, not only with our Support plugin but with other plugins as well.

    I have found that the issue is that JetPack injects its scripts on all pages and does not use conditional logic to insert its scripts in the page, only with one script does it control where it appears, but all other scripts are loaded in all pages, this is the reason why it has the conflict.

    Among other causes, the issue is caused by the following snippet in function handle_editor_view_js() in the file jetpack/modules/contact-form/grunion-editor-view.php:

    if ( ! isset( $current_screen->id ) || $current_screen->base !== 'post' ) {
    	return;
    }

    Unfortunately, in order to make this perfectly, the JetPack plugin has to be modified but it is beyond the scope of this support forum to modify third party code. However, I have found the following code snippet to be very useful in making the Support plugin work. I have placed the following code in a PHP file and uploaded it to the 'wp-content/mu-plugins' folder:

    add_action( "admin_init", "disable_jetpack_grunion", 1000 );
    function disable_jetpack_grunion() {
        remove_action( 'admin_notices', array( "Grunion_Editor_View", 'handle_editor_view_js' ) );
        remove_filter( 'mce_external_plugins', array( "Grunion_Editor_View", 'mce_external_plugins' ) );
        remove_filter( 'mce_buttons', array( "Grunion_Editor_View", 'mce_buttons' ) );
        remove_action( 'admin_head', array( "Grunion_Editor_View", 'admin_head' ) );
    }

    After uploading this code, I was able to add FAQs in the Support plugin in both Text and Visual views and it saved successfully. I hope this helps you as well.

    Please let us know if you need any further assistance and we will be happy to help as best we can.

    Have a nice day.
    Mahlamusa.

  • Lindeni Mahlalela

    Hello Mr Fox,

    I hope you are doing great today. Just an afterthought about the code shared above. The code will remove the JetPack actions in all admin pages, to avoid this and make sure it only removes it on the FAQs Manager and Tickets page.

    I have modified the code so that it will only affect the pages related to Support System pages. You may replace the above code with the following:

    add_action( "current_screen", "disable_jetpack_grunion", 1000 );
    function disable_jetpack_grunion() {
    	$screen = get_current_screen();
    	if ( $screen->base == 'support_page_support-faq-manager-network' || $screen->base == 'toplevel_page_ticket-manager-network' ) {
    		remove_action( 'admin_notices', array( "Grunion_Editor_View", 'handle_editor_view_js' ) );
    		remove_filter( 'mce_external_plugins', array( "Grunion_Editor_View", 'mce_external_plugins' ) );
    		remove_filter( 'mce_buttons', array( "Grunion_Editor_View", 'mce_buttons' ) );
    		remove_action( 'admin_head', array( "Grunion_Editor_View", 'admin_head' ) );
    	}
    }

    I hope this helps. Please let us know how it goes.

    Have a nice day.
    Mahlamusa

  • Dimitris

    Hello there Mike,

    hope you're doing good today! :slight_smile:

    I can see that Mahlamusa has used a MU plugin for this fix.

    I have placed the following code in a PHP file and uploaded it to the 'wp-content/mu-plugins' folder:

    Just check which file contains the snippet from his reply here
    https://premium.wpmudev.org/forums/topic/i-installed-7#post-1274289
    and you can simply copy this file in the wp-content/mu-plugins/ folder of the other installation -simply create the /mu-plugins/ folder, if it doesn't exist already- and that'll be enough for code to run. :slight_smile:

    More info on using MU plugins can be found here:
    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Warm regards,
    Dimitris