Support » Plugin: Simple Custom CSS and JS » There is an issue

  • No doubt this plugin is good, but I’ve found that, in the code editor Search is not works properly. This review is for admin to make better the plugin.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    Could you please describe in more details why is the Search not working properly? The search dialog doesn’t open? Or does it show wrong results?

    Thread Starter abhisekbose99

    (@abhisekbose99)

    Actually I did not get any dedicated search bar for inside the code editor. After clicking the Ctrl+F, the browser opens its common search box, which is not able to find any particular word inside the code editor.

    Plugin Author Diana Burduja

    (@diana_burduja)

    Would you please click somewhere inside the editor, so the editor is selected, then hit the Ctrl + F?
    If the editor is not selected, then the browser’s search box opens.

    Thread Starter abhisekbose99

    (@abhisekbose99)

    Yes, I clicked Ctrl + F after selecting the editor, but it’s not working. Each time the browser opens its own Search Box. Also, I’ve tried this in different browsers.

    Plugin Author Diana Burduja

    (@diana_burduja)

    This is how the search box should look in the editor.

    I think there is a JavaScript error that breaks the search on your website. Could you please open the browser’s console (“Ctrl + Shift + I”, then choose the “Console” tab) to see if there are any JavaScript errors there? Try hitting “Ctrl + F” in the editor to see if any JavaScript errors show up in the browser’s console.

    Thread Starter abhisekbose99

    (@abhisekbose99)

    Yes I’ve found an error in console:
    Uncaught TypeError: CodeMirror.commands.autocomplete is not a function
    <anonymous> : …/wp-content/plugins/custom-css-js/assets/ccj_admin.js?ver=3.33:73
    signal : …/wp-content/themes/porto/js/codemirror.js?ver=3.5:8246
    signalDOMEvent : …/wp-content/themes/porto/js/codemirror.js?ver=3.5:8287
    onKeyUp : …/wp-content/themes/porto/js/codemirror.js?ver=3.5:4239
    registerEventHandlers : …/wp-content/themes/porto/js/codemirror.js?ver=3.5:3533

    Plugin Author Diana Burduja

    (@diana_burduja)

    The Porto 3.5 theme uses the same CodeMirror editor as the Simple Custom CSS & JS plugin. The theme’s CodeMirror version of the editor is loaded on the “Edit Custom CSS” page and that version doesn’t have the “autocomplete” or the “find” functionality.

    Note that this issues shows up only in the older versions of Porto. The 3.5 version is already more than 4 years old. Any Porto theme after 4.4.0 version (released May 2018) will not have this issue with the “autocomplete” and “find” functionality in the Simple Custom CSS and JS plugin.

    If you want to fix this issue on your website, then you can edit the functions.php file in your theme’s folder and add the following two lines:

    $screen = get_current_screen();
    if ( $screen->post_type === 'custom-css-js' ) return;

    right after the function porto_admin_scripts() { line. On the Porto 3.6.2 version that would be after the line 399.

    Plugin Author Diana Burduja

    (@diana_burduja)

    @abhisekbose99 Your issue concerns a small incompatibility with a theme, which was solved in 2018.

    You could update the theme or use the solution I suggested. In either case feel free to update the review and/or the review’s score.

    Thread Starter abhisekbose99

    (@abhisekbose99)

    Thank you very much, I’ve updated the theme, now it’s working fine.
    Thanks a lot once again for your kind guidance. Now the experience of the plugin is great.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘There is an issue’ is closed to new replies.