• Resolved JamieWD

    (@jamiewd)


    After an update this weekend to the latest wordpress 3.8.1 the admin area started having issues where it appears the Javascript was not able to load / run. Runnign the Chrome inspector shows some scripts which cue the required files seemd to not respond.

    http://img.acianetmedia.com/i/pi3AF.gif

    The page would still work where direct links could be clicked. I tried disabling all the Plugins this way but it still did not load correctly. I Checked the file permissions, and manually copied in the wordpress admin files… still the same.

    I dug around some forums and found people suggesting that adding the line

    define('CONCATENATE_SCRIPTS', false);

    to the wp-config file would disable this script en-cuing. Even though these post were over a year old this seemed to work. The admin page now is laid out correctly and styles CSS etc seem to work. I no longer have consol errors.

    HOWEVER I can no longer update any plugins (which I want to do thinking that they might be the original problem). When I click on the “update now” I just get (this happens on at least 4 different plugins that need updating)

    Downloading update from https://downloads.wp.xz.cn/plugin/wp-socializer.2.4.9.8.zip…
    
    Unpacking the update…

    and this sits here forever. It seems to download OK – but not unzip / complete the install.

    I have this issue on 2 different word press installs on two different domains / accounts – though on the same hosting provider.

    Can anyone give em an idea what is happening here?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Do this:

    1. Remove the line added in wp-config.php.
    2. Rename the whole /wp-content/plugins/ folder to /wp-content/old-plugins.
    3. Clear local browser cache.
    4. Log into site. Check admin, etc.
    5. Renaming the plugins folder will have deactivated all plugins.
    6. Rename plugins folder back to original.
    7. Log into site. Update any plugins needing updating.
    8. Activate plugins one at a time. After each update, logout and back in checking site functionality. Note any performance type, caching or minify plugins are activated only after all site tests are done.
    9. Repeat. When the issues comes back, the last plugin activated is the problematic one. Discuss will plugin provider or use another.

    Thread Starter JamieWD

    (@jamiewd)

    Hi thanks for your response.
    I have actually done this;

    1. Commented out the line added in wp-config.php. /* */
    2. Rename the whole /wp-content/plugins/ folder to /wp-content/stop-plugins.
    3. Clear local browser cache.
    4. Log into site. Check admin, etc.
    5. Renaming the plugins folder will have deactivated all plugins – Yep.
    6. Rename plugins folder back to /wp-content/plugins.
    7. Log into site. Update any plugins needing updating.

    The Admin area is again broken. No plugins are updating… the java issues in my previous screen shot are back.

    If I ignore the broken layout and go to /wp-admin/plugins.php and click on the ‘update now’ link the page loads and I get the same downloading then ‘unpacking..’ message and it has stopped / freezes – but I suspect a JavaScript file is needed to actually run this part?? I don’t see any further errors in the console though.

    I would perform an Extended Manual Upgrade.

    We want to remove all WP core files and replace them with known unedited files from a current download (not overwrite). That is all WP files in root (of wp install) except .htaccess and wp-config.php, the two folders wp-admin and wp-includes. Do not touch wp-content at this time.

    Once that is done, test site and all functionality.

    Thread Starter JamieWD

    (@jamiewd)

    OK. I did a manual upgrade and the admin area loads OK now without the “define(‘CONCATENATE_SCRIPTS’, false);” line in the config.
    However I still can not update any plugins ( they are all disabled now) and though it still freezes on Updating I now get this message
    “Enabling Maintenance mode…

    Updating Plugin Social Media Feather (1/1) “

    Which means the .maintenance file is in place and the site is down .. since the update never finishes I have to manual remove this .. I also manually remove the folder created in the wp-content/upgrades/ folder .. then try again and again.

    I have check the permissions and they all seem correct – 755 folders, 644 files.

    Given it is now a “clean” install what else could be wrong here? Just seems odd that this has all come from the latest upgrade.

    This is specific to your install, so the most likely cause would seem to be something in the server’s configuration that is stopping the updates from running normally. Have you checked your site’s error logs recently?

    Thread Starter JamieWD

    (@jamiewd)

    OK, firstly .. I stuffed up and the admin layout is still broken after a manual upgrade with “define(‘CONCATENATE_SCRIPTS’, false);” removed and plugins folder renamed so they do not load.

    I can not update the site with or without it in place due as per my opening post the admin layout is broken.

    With it the code removed …

    The error logs in the cPanel account show a few old permission errors that have since been fixed but that is all.. I don’t see any PHP errors.

    After much messing about trying to get WordPress to log errors somewhere (it’s a live site want to keep it going) I just turned on “define( ‘WP_DEBUG’, true );” in the config file (I’m not root on this cPanel account, and I can’t reliably know if I am installing other plugins OK).

    I do not get any error output on screen.

    The console error looks like this:
    http://www.sssss.com/wp-admin/load-styles.php?c=1&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check&ver=3.8.1
    http://www.sssss.com.au/wp-admin/load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,json2&ver=3.8.1

    .. again prior to this 3.8.1 update this site function well… now 5 days of hair pulling.

    Thread Starter JamieWD

    (@jamiewd)

    Follow up. I notice I still see a theme asking to be updated with the plugins folder renamed .. It’s called “Responsive” .. which is how I can test if updating still works.

    If I rename the “plugins-old” folder back to “plugins” with errors displayed on I do get this displayed :

    Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /home/sssss/public_html/sssss.com/wp-includes/functions.php on line 3049

    So something is wrong in a plugin (though it is just a notice error) .. however the admin layout is broken without this folder renamed.

    Thread Starter JamieWD

    (@jamiewd)

    So since I’m thinking the main issues is the 404 for the encued scripts file which should return something..
    /wp-admin/load-scripts.php and that php file is in the right location ..

    If I turn on error reporting ALL in that file and call it without any values I get a Notice error ( due to missing URL values) so the script is running – but if I include the values it goes to a 404 wordpress page.

    So being more analytical I edited the load-scripts.php file to see where the out put ends.
    NOTE: to stop header errors I have commented them out .. the idea being the file contents would be drawn to the browser window anyway.

    Starting @ line 149

    //header('Content-Type: application/x-javascript; charset=UTF-8');
    //header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
    //header("Cache-Control: public, max-age=$expires_offset");
    echo "A";
    if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
    	echo "B";
    	//header('Vary: Accept-Encoding'); // Handle proxies
    	echo "C";
    	if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
    	echo "D";
    		//header('Content-Encoding: deflate');
    		$out = gzdeflate( $out, 3 );
    	echo "E";
    	} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
    	echo "F";
    		//header('Content-Encoding: gzip');
    		$out = gzencode( $out, 3 );
    	echo "G";
    	}else{
    	echo "H";
    	}
    }else{
    	echo "I";
    }
    	echo "J";
    echo $out;
    exit;

    I have put in echo “a” “b” etc.. so I can see where the script stops.

    With the full URL request
    wp-admin/load-scripts.php?c=1&load=jquery-core,jquery-migrate,utils,json2&ver=3.8.1

    my browser output is ABCD
    even though I have error_reporting(E_ALL); at the top of the page I see no errors on screen or logged.

    so something to do with the gzdeflate function is silently crashing the script…?

    Unfortunately my PHP coding skills stop about here.

    Any ideas?

    Thread Starter JamieWD

    (@jamiewd)

    OK.. I just commented out the gzdeflate function and echo the $out value directly ( with headers re-enabled ) and the files now are sent uncompressed and visible to a direct browser query .. the admin area now functions.

    This I would say is clearly going to be related to reason why updates are not uncompressing and stopping their installation.

    Thread Starter JamieWD

    (@jamiewd)

    I have passed the issues onto my host but now I know the problem I also found the following pre-existing post. Linking this here to help others who might have this issue.

    http://ww.wp.xz.cn/support/topic/gzdeflate-and-load-stylesphp-issue?replies=2

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Javascript Encuing issue with WordPress – Plugins not updating’ is closed to new replies.