Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter nilukulu

    (@nilukulu)

    Hi Paul,

    Thanks for all the efforts! There was a conflict with a plugin!
    I managed to get rid of that plugin and now its working fine!

    Thanks once again!

    Thread Starter nilukulu

    (@nilukulu)

    Let me know if i should share my plugin and theme with you.

    Thanks,
    Nilesh Kulkarni

    Thread Starter nilukulu

    (@nilukulu)

    Hi,

    The code is being used in a view file named new-listing.php and wp editor is called on line 95.

    CODE –
    https://www.codepile.net/pile/eYoP3KJ0

    I am using essentials wordpress theme from theme forest and fitness trainer plugin from codecanyon.

    If you want, I can share the theme and plugin files with you. They are licensed but I don’t think it would be an issue if you using only for testing. If its only for testing, you can even find a nulled version of the same plugin on the internet.

    Let me know if you need any more details.

    Thanks

    Thread Starter nilukulu

    (@nilukulu)

    Actually the issue comes when this code is added in functions.php –

    if ( class_exists( 'InsertPagesPlugin' ) ) {
    	require_once ABSPATH . 'wp-admin/includes/template.php';
    	require_once ABSPATH . 'wp-admin/includes/theme.php';
    	add_filter( 'wp_head', array( InsertPagesPlugin::get_instance(), 'insert_pages_admin_init' ) );
    	add_filter( 'print_footer_scripts', array( InsertPagesPlugin::get_instance(), 'insert_pages_add_quicktags' ) );
    }

    in the themes functions.php.

    If this code is removed, the error goes but the Insert Pages button also disappears from my plugin’s TinyMCE.

    If I add only this –

    if ( class_exists( 'InsertPagesPlugin' ) ) {
    	add_filter( 'wp_head', array( InsertPagesPlugin::get_instance(), 'insert_pages_admin_init' ) );
    	add_filter( 'print_footer_scripts', array( InsertPagesPlugin::get_instance(), 'insert_pages_add_quicktags' ) );
    }

    Still the issue persists.

    • This reply was modified 3 years, 11 months ago by nilukulu.
    Thread Starter nilukulu

    (@nilukulu)

    Hey Paul,

    Hope yoy are having a great weekend!
    Thanks for the update!

    I updated to version 3.6.0 and I am facing the same issue unfortunately ??

    On the page load event on the wp_editor page, I get this error –
    Uncaught TypeError: this._addClass is not a function

    And if I click on any button in the TinyMCE plugin, including the Insert pages button, I get this error –

    Uncaught TypeError: t.quirks is undefined

    If i disable the Insert Pages plugin, everything works fine on that page.

    Let me know if you need more details from my side.

    Thread Starter nilukulu

    (@nilukulu)

    okay sure! Perfect. Looking forward to the update !
    THanks once again for all the help!

    Thread Starter nilukulu

    (@nilukulu)

    If I disable Insert Pages, I dont see any errors in that view page. If the plugin is activated, it shows the errors.

    I am calling wp_editor() like this –

    <div class="form-group" >
    <div class=" ">
    	<?php
    		
    		$settings_a = array(
    		'textarea_rows' =>8,
    		'editor_class' => 'form-control-solid',
    		'textarea_rows'=>15,
    		);
    		$editor_id = 'new_post_content';
    		wp_editor( '', $editor_id,$settings_a );
    	?>
    </div>						
    </div>
    Thread Starter nilukulu

    (@nilukulu)

    I am calling wp_editor in a php view file of the plugin.

    Thread Starter nilukulu

    (@nilukulu)

    Would you help me if I share the FTP details with you?

    I am not an expert programmer ??

    Thread Starter nilukulu

    (@nilukulu)

    Also getting this message on clicking the insert pages button in the editor –

    tinymce.min.js?ver=49110-20201110:2 Uncaught TypeError: Cannot read property 'refreshContentEditable' of undefined
        at tinymce.min.js?ver=49110-20201110:2
        at uh (tinymce.min.js?ver=49110-20201110:2)
        at tN.focus (tinymce.min.js?ver=49110-20201110:2)
        at pp.execCommand (tinymce.min.js?ver=49110-20201110:2)
        at tN.execCommand (tinymce.min.js?ver=49110-20201110:2)
        at i.t.cmd.t.onclick (tinymce.min.js?ver=49110-20201110:2)
        at vp.c.fire (tinymce.min.js?ver=49110-20201110:2)
        at i.fire (theme.min.js?wp-mce-49110-20201110:1)
        at HTMLDivElement.o (theme.min.js?wp-mce-49110-20201110:1)
        at C (tinymce.min.js?ver=49110-20201110:2)
    Thread Starter nilukulu

    (@nilukulu)

    Hey Paul,

    Thanks for the update! I updated the plugin and added the filters in my theme’s functions.php. I can now see the insert pages button on the editor of my plugin!

    However when i click on it, nothing happens and i see this in the console –

    
    Uncaught TypeError: t.quirks is undefined
        uh https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        uh https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        focus https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        execCommand https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        execCommand https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        onclick https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        fire https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        fire https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
    

    Also, when the page is loaded, I see this –

    
    Uncaught TypeError: this._addClass is not a function
        jQuery 8
        onPostRender https://localhost/wp-includes/js/tinymce/plugins/wplink/plugin.min.js?wp-mce-49110-20201110:1
        a https://localhost/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js?ver=49110-20201110:1
        fire https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        fire https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        postRender https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        exec https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        jt https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        each https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        exec https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        postRender https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        exec https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        jt https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        each https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        exec https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        postRender https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        postRender https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        exec https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        jt https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        each https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        exec https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        postRender https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        renderTo https://localhost/wp-includes/js/tinymce/themes/modern/theme.min.js?wp-mce-49110-20201110:1
        _createToolbar https://localhost/wp-includes/js/tinymce/plugins/wordpress/plugin.min.js?wp-mce-49110-20201110:1
        <anonymous> https://localhost/wp-includes/js/tinymce/plugins/wplink/plugin.min.js?wp-mce-49110-20201110:1
        fire https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        fire https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        bw https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        ww https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        Aw https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        Ow https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        jt https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        n https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        onload https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        jt https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        loadScripts https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        loadQueue https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        Ow https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        waitFor https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        Ow https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        jt https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        n https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        onload https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        jt https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        u https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        loadScripts https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        loadQueue https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        Ow https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        Ow https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        Bw https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        render https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        n https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        e https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        jt https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        e https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        C https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        d https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        a https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        xe https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        Ee https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        bind https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        <anonymous> https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
        <anonymous> https://localhost/wp-includes/js/tinymce/tinymce.min.js?ver=49110-20201110:2
    

    What could be the issue ?

    • This reply was modified 3 years, 11 months ago by Yui. Reason: please use CODE button for proper formatting
    Thread Starter nilukulu

    (@nilukulu)

    Hey Paul,

    I am trying to load the wp_editor() on front end but only admins will have access to it. So not a security risk.

    My code looks like this now

    <div class="form-group" >
    <div class=" ">
    <?php
    if ( class_exists( 'InsertPagesPlugin' ) ) {
    add_filter( 'enqueue_scripts', array( InsertPagesPlugin::get_instance(), 'insert_pages_admin_init' ) );
    }
    $settings_a = array(
    'textarea_rows' =>8,
    'editor_class' => 'form-control-solid',
    'textarea_rows'=>15,
    );
    $editor_id = 'new_post_content';
    wp_editor( '', $editor_id,$settings_a );
    ?>
    </div>						
    </div>

    However still I get the issue –
    Failed to initialize plugin: wpInsertPages

    Following is the screenshot –

    Screenshot

    Thread Starter nilukulu

    (@nilukulu)

    After doing that, it gives me an error –

    Failed to initialize plugin: wpInsertPages

    in the tinymce editor of my plugin .

    • This reply was modified 3 years, 11 months ago by nilukulu.
Viewing 13 replies - 1 through 13 (of 13 total)