Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #882325

    I have tried reinstalling wordpress, deactivating all plug-ins and I cannot get the widgets to open the text editor without throwing a javascript error. I have seen this issue presented in different threads but I do not see a resolve for this. I activate the default 2017 theme and they work fine so it has to be something conflicting in the Enfold theme. Getting Cannot read property ‘modelConstructors’ of undefined, Cannot read property ‘init’ of undefined, Cannot read property ‘idBases’ of undefined all in widgets.php. Please advise.
    Thanks,

    #882466

    Hey cyber13,

    Please, share with us your WP credentials?

    Best regards,
    John Torvik

    #882751

    ok thanks

    #882754

    Hi,

    Can you please try adding following code to wp-config.php file near top and check if that helps?

    
    define('CONCATENATE_SCRIPTS', false);

    Best regards,
    Yigit

    #882758

    tried that and it didn’t do anything but I think i may have found the culprit. I had added code to defer javascript to increase site speed to the functions file. When I remove it, it seems to load fine. Is there a way to disable that from happening in the wp-admin or when logged in?

    add_filter('clean_url','async_js',11);
    function async_js($url) {
          if ( false !== strpos( $url, 'jquery.js' ) || false === strpos( $url, '.js' )) {
              return $url;
          }
          return "$url' defer='defer";        
    } 
    #882769

    Hi,

    Glad you figured it out!

    Please change your code to following one

    add_filter('clean_url','async_js',11);
    function async_js($url) {
          if ( false !== strpos( $url, 'jquery.js' ) || false === strpos( $url, '.js' ) || !is_admin()) {
              return $url;
          }
          return "$url' defer='defer";        
    } 

    Best regards,
    Yigit

    #882872

    that didn’t work. Any other suggestions?

    #883145

    Hi cyber13,

    Try like this:

    
    add_filter('clean_url','async_js',11);
    function async_js($url) {
          if ( false !== strpos( $url, 'jquery.js' ) || false === strpos( $url, '.js' ) || is_admin()) {
              return $url;
          }
          return "$url' defer='defer";        
    } 
    

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #883174

    that worked! Thank you so much!

    #883798

    Hi,

    Great, glad we could help. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.