#56936 closed enhancement (fixed)
Remove bundled theme files from $_old_files
Reported by: | SergeyBiryukov | Owned by: | desrosj |
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | has-patch fixed-major |
Focuses: | Cc: |
Description
Per @desrosj in comment:4:ticket:56934:
I'm wondering about including the deleted theme files here. Except 6.0, I don't see any additional
wp-content/themes/*
entries in the list.
As far as I know, themes are not included with update packages unless it's the first release being included (and they are not intentionally skipped with the
CORE_UPGRADE_SKIP_NEW_BUNDLED
constant).
...
In my testing, it seems that files within
wp-content/themes/*
are not flagged during Core upgrades and can probably be left out from this list.
Based on the above, it looks like bundled theme files should be removed from the list and a note should be added to clarify that for future updates.
Change History (13)
This ticket was mentioned in Slack in #core-upgrade-install by costdev. View the logs.
2 years ago
This ticket was mentioned in PR #3632 on WordPress/wordpress-develop by @costdev.
2 years ago
#2
- Keywords has-patch added
#4
@
2 years ago
- Keywords commit added; needs-testing removed
- Owner set to desrosj
- Status changed from new to assigned
I've updated the Dry Run section of the handbook to note that theme files need not be noted in $_old_files
.
#5
@
2 years ago
I did some more testing before making this update and wanted to detail what I found which confirms that these files should be excluded.
Including bundled theme files in the $_old_files
list could actually break sites when Core is set to auto-update major versions and the theme with a file included in the list has auto-updates off.
The reason is that all files in the list are deleted when Core updates, regardless of where they are located. So if an earlier version of the theme depends on a file removed in a future version, and that file is listed in $_old_files
, it will be deleted and sites with this theme active will potentially break.
This scenario has thankfully not yet happened because the files that were included in this list so far were only license files and SASS files.
#7
follow-up:
↓ 10
@
2 years ago
- Keywords fixed-major added; commit removed
- Milestone changed from 6.2 to 6.1.2
- Resolution fixed deleted
- Status changed from closed to reopened
I think this is worth consideration for backporting to the 6.1 branch, but don't feel strongly about that.
Backporting to the 6.0 branch is unnecessary.
This ticket was mentioned in Slack in #core-upgrade-install by costdev. View the logs.
2 years ago
#10
in reply to:
↑ 7
@
2 years ago
Replying to desrosj:
I think this is worth consideration for backporting to the 6.1 branch, but don't feel strongly about that.
I don't feel strongly either, but it's a straightforward fix and backporting would not hurt, so might as well do that :)
#12
@
20 months ago
- Milestone changed from 6.1.2 to 6.2
Moving back to 6.2, as there are no plans for 6.1.2 at this time.
This PR:
$_old_files
.Trac ticket: https://core.trac.wordpress.org/ticket/56936