Opened 2 days ago
Last modified 36 hours ago
#63709 new defect (bug)
Twenty Twelve: version 4.6 adds CRLF line endings on every file
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.8.3 | Priority: | normal |
Severity: | normal | Version: | 6.8.2 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
We tried to update to version 4.6 of the Twenty Twelve theme today on a site where the codebase is versioned in a Git repository. After replacing the folder with the latest version of the theme, the diff shows that every file in the repository shows that every line has changed, but with no visible differences except for the small “actual” changes that were introduced in this release.
Running git diff | cat -v
as suggested at https://stackoverflow.com/a/39502438 seems to indicate that all of the line endings in the files have been converted from Unix-style LF to DOS-style CRLF
Here is an example of that diff output for the 404.php file:
diff --git a/wp-content/themes/twentytwelve/404.php b/wp-content/themes/twentytwelve/404.php index 8b039ecee..2433d6184 100644 --- a/wp-content/themes/twentytwelve/404.php +++ b/wp-content/themes/twentytwelve/404.php @@ -1,29 +1,29 @@ -<?php -/** - * The template for displaying 404 pages (Not Found) - * - * @package WordPress - * @subpackage Twenty_Twelve - * @since Twenty Twelve 1.0 - */ - -get_header(); ?> - - <div id="primary" class="site-content"> - <div id="content" role="main"> - - <article id="post-0" class="post error404 no-results not-found"> - <header class="entry-header"> - <h1 class="entry-title"><?php _e( 'This is somewhat embarrassing, isn’t it?', 'twentytwelve' ); ?></h1> - </header> - - <div class="entry-content"> - <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentytwelve' ); ?></p> - <?php get_search_form(); ?> - </div><!-- .entry-content --> - </article><!-- #post-0 --> - - </div><!-- #content --> - </div><!-- #primary --> - -<?php get_footer(); ?> +<?php^M +/**^M + * The template for displaying 404 pages (Not Found)^M + *^M + * @package WordPress^M + * @subpackage Twenty_Twelve^M + * @since Twenty Twelve 1.0^M + */^M +^M +get_header(); ?>^M +^M + <div id="primary" class="site-content">^M + <div id="content" role="main">^M +^M + <article id="post-0" class="post error404 no-results not-found">^M + <header class="entry-header">^M + <h1 class="entry-title"><?php _e( 'This is somewhat embarrassing, isn’t it?', 'twentytwelve' ); ?></h1>^M + </header>^M +^M + <div class="entry-content">^M + <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentytwelve' ); ?></p>^M + <?php get_search_form(); ?>^M + </div><!-- .entry-content -->^M + </article><!-- #post-0 -->^M +^M + </div><!-- #content -->^M + </div><!-- #primary -->^M +^M +<?php get_footer(); ?>^M
We were able to replicate this by updating the theme both via wp cli theme update and by downloading the ZIP from wp.org.
Attachments (1)
Change History (8)
#2
@
2 days ago
@audrasjb Nope, copying over the twentytwelve
folder from that download into our site repo only shows the two expected diffs in the new version of the theme.
You can also see from looking at the Last Commit Date column for that folder in the GitHub repo that none of the other files in the folder for twentytwelve
have changed recently, besides style.css
, functions.php
, and readme.txt
https://github.com/WordPress/WordPress/tree/master/wp-content/themes/twentytwelve
#3
@
2 days ago
Ok thanks, then it means that it's the process of publishing the last release of the theme that failed. I'll circle back to the theme committers on Slack so we can update the files asap.
#5
@
2 days ago
- Version set to 6.8.2
I uploaded new packages to #63681 since Twenty Twelve was updated, and they should be reviewed.
Twenty Twelve probably needs a version 4.7 now.
Also, the handbook page needs updating to include --native-eol LF
in the svn export
command.
#6
follow-up:
↓ 7
@
2 days ago
- Summary changed from Version 4.6 of twentytwelve theme adds CRLF line endings on every file to Twenty Twelve: version 4.6 adds CRLF line endings on every file
I hope the package can be updated without a new version, but the attached patch is available in case that is important.
#7
in reply to:
↑ 6
@
36 hours ago
- Keywords has-patch added
I hope the package can be updated without a new version...
The new version is necessary:
"Not updating the version number means a new version of the theme can’t be uploaded to the theme directory."
Hello and welcome to WordPress Core Trac,
Moving to milestone 6.8.3 pending detailed review.
@pfg do you experience the same issue with the version bundled into WordPress Core? You can download the ZIP file containing all bundled themes file from the GitHub repository: https://github.com/WordPress/WordPress/archive/refs/heads/6.8-branch.zip
Pinging @poena for info.