• Hello

    After upgrading WordPress into the 5.3 version the revisions stopped working. Server is showing “Internal Server Error” (and there’s no way to show/log error message, all failed: wp_debug, display_errors, log_errors + error_log). I’ve tried to look out for the source of the error and I’ve pinned the problem to single line:
    wp_localize_script( ‘revisions’, ‘_wpRevisionsSettings’, wp_prepare_revisions_for_js( $post, $revision_id, $from ) );

    The part with wp_prepare_revisions_for_js is fine (I can var_dump it and I can see that there is a table with two columns), so the only thing that can be wrong is the function wp_localize_script.

    Is there a way to tell why is it failing?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    Internal server errors (error 500) are often caused by plugin or theme function conflicts, so if you have access to your admin panel, try deactivating all plugins. If you don’t have access to your admin panel, try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the default theme for your version of WordPress to rule-out a theme-specific issue. If you don’t have access to your admin panel, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue.

    If that does not resolve the issue, it’s possible that a .htaccess rule could be the source of the problem. To check for this, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and rename the .htaccess file. If you can’t find a .htaccess file, make sure that you have set your SFTP or FTP client to view invisible files.

    If you weren’t able to resolve the issue by either resetting your plugins and theme or renaming your .htaccess file, we may be able to help, but we’ll need a more detailed error message. Internal server errors are usually described in more detail in the server error log. If you have access to your server error log, generate the error again, note the date and time, then immediately check your server error log for any errors that occurred during that time period. If you don’t have access to your server error log, ask your hosting provider to look for you.

    Thread Starter januzi_pl

    (@januzi_pl)

    Hello

    The only error message in the logs is “End of script output before headers: revision.php”.

    I’ve edited some files to get to the bottom of the problem and I’ve found out that wp-diff.php is somewhat responsible for that error. The code looks like this:

    
    $plik = fopen( 'log.txt', 'w' ) ;
    fwrite( $plik, "1\r\n" ) ;
    
    if ( ! class_exists( 'Text_Diff', false ) ) {
            fwrite( $plik, "a\r\n" ) ;
    	/** Text_Diff class */
    	require( ABSPATH . WPINC . '/Text/Diff.php' );
    	 fwrite( $plik, "2\r\n" ) ;
    	/** Text_Diff_Renderer class */
    	require( ABSPATH . WPINC . '/Text/Diff/Renderer.php' );
    	 fwrite( $plik, "3\r\n" ) ;
    	/** Text_Diff_Renderer_inline class */
    	require( ABSPATH . WPINC . '/Text/Diff/Renderer/inline.php' );
    	 fwrite( $plik, "4\r\n" ) ;
    }
    fwrite( $plik, "b\r\n" ) ;

    And the result is “1a”, so clearly script can’t go past Text/Diff.php. So, as far as I know php it is not a problem with plugins, theme nor with the htaccess.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘500 error on the revisions page’ is closed to new replies.