-
AuthorPosts
-
November 27, 2017 at 6:31 pm #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,November 28, 2017 at 3:13 am #882466Hey cyber13,
Please, share with us your WP credentials?
Best regards,
John TorvikNovember 28, 2017 at 4:33 pm #882751ok thanks
November 28, 2017 at 4:39 pm #882754Hi,
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,
YigitNovember 28, 2017 at 4:48 pm #882758tried 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"; }
November 28, 2017 at 5:27 pm #882769Hi,
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,
YigitNovember 28, 2017 at 9:19 pm #882872that didn’t work. Any other suggestions?
November 29, 2017 at 7:55 pm #883145Hi 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,
VictoriaNovember 29, 2017 at 8:37 pm #883174that worked! Thank you so much!
December 1, 2017 at 10:24 am #883798 -
AuthorPosts
- You must be logged in to reply to this topic.