• I upgraded my WordPress to 3.5 and noticed a small problem, I can’t switch between Visual and Text tabs, but I followed this link and got to step 2, where my problem was fixed.

    I added

    define('SCRIPT_DEBUG', true);

    to my wp-config.php, it says if my problem is fixed ask on here, which it was

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Do you have an .htaccess file in your /wp-admin directory? If so, then that is probably your problem.

    Thread Starter lieutenantdan

    (@lieutenantdan)

    No, I do not have an .htaccess file in my wp-admin directory.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Hmmm.. Okay, so if you turn off the debug line, and make the errors happen again, what sort of error messages appear in the browser’s javascript console?

    Thread Starter lieutenantdan

    (@lieutenantdan)

    I was getting undefined length and switchto error, I fixed it by removing each JS file and by process of elimination it was the jQuery UI CDN I was using, I switched to using the ones WordPress comes with.

    I’ve reproduced this on a couple of installs. I tracked it down to the concatenated scripts link returning as 404. Specifically, the brackets added to line 703 of wp-includes/script-loader.php in changeset 27074 (https://core.trac.www.ads-software.com/changeset/23074). Since concatenation doesn’t occur on define( SCRIPT_DEBUG, true ), this explains why it’s “fixed” in this case. Once I remove the brackets, things mostly resumed to normal. The other issues look like they’re related to the load order of scripts, but I’ve run out of time to track down the issue for now. Once, the brackets are removed, it should be noted that Firebug doesn’t report javascripts errors on every page. However, they do appear on a numner of javascript heavy pages, like the widgets page, the dashboard home page, and the post edit page to name a few. Here’s what cosistently seems to appear after the removal of the brackets:

    TypeError: e.widget is not a function
    [Break On This Error]

    …top:function(i,s){n.position=[s.position.left-t.document.scrollLeft(),s.position…

    load-s…ver=3.5 (line 5)

    ReferenceError: Backbone is not defined
    [Break On This Error]

    …true,count:null,iframe:null,iframeWindow:null,messageQ:[],iframeSpinnerShown:fal…

    admin-…-201250 (line 1)

    ReferenceError: Backbone is not defined
    [Break On This Error]

    …true,count:null,iframe:null,iframeWindow:null,messageQ:[],iframeSpinnerShown:fal…

    admin-…-201250 (line 1)

    TypeError: wpntView is not a constructor
    [Break On This Error]

    …true,count:null,iframe:null,iframeWindow:null,messageQ:[],iframeSpinnerShown:fal…

    admin-…-201250 (line 1)

    Hope this helps.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    lieutenantdan: Yes, if you’re using any sort of code that replaces the WordPress Javascript, then you’re going to have problems. Don’t do that. ??

    Brandon Allen: We’d prefer that you please start your own topic instead of piggy backing onto other people’s.

    However, yes, WordPress now uses brackets in the load-scripts call. This is intentional, and if your server is blocking this request because of those brackets, then that is a problem with your server configuration in some manner. Brackets are a way of specifying array parameters in PHP, and they were added there because some servers have issues with extremely long URL variables, which the load= parameter was starting to reach limits on. Therefore it’s split up for long cases.

    You need to find what in your configuration is disallowing brackets from making the URL work. Note that if you ever used BulletProof Security plugin in the past, then it can leave behind an .htaccess file in the wp-admin folder which would cause this error. The wp-admin folder should not have an .htaccess file in it, please remove one if you find it there.

    Otto,

    Sorry, I actually wasn’t trying to piggyback. I just had two things working against me: 1) I was on the wrong track, and 2) because of interruptions, ieutenantdan posted his reply after I clicked the reply button, but before I hit the post button. And, because his reply contained a resolution, it made my reply look out of place.

    Oh well. Behind on my coffee, so I having a hard time staying focused :). Thanks for the help anyway. Wouldn’ve have gotten there eventually, but now it’ll be a little quicker.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘3.5 Diagnose Javascript’ is closed to new replies.