[wp-trac] [WordPress Trac] #53323: Place Hello Dolly in containing folder
WordPress Trac
noreply at wordpress.org
Sat May 24 22:35:51 UTC 2025
#53323: Place Hello Dolly in containing folder
-------------------------------------------------+-------------------------
Reporter: afragen | Owner: afragen
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future
| Release
Component: Upgrade/Install | Version: 5.8
Severity: normal | Resolution:
Keywords: has-unit-tests needs-refresh has- | Focuses:
patch has-test-info |
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* keywords: has-unit-tests needs-refresh needs-testing has-patch => has-
unit-tests needs-refresh has-patch has-test-info
Comment:
== Test Report
=== Description
❌ This report can't validate that the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-
develop/pull/1330.diff
=== Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins:
* Core Updater Mod 1.0.0
* Test Reports 1.2.0
=== Testing Protocol
I'm going to explain step by step how I have tested this patch. It's a
little tricky, so I will provide the maximum files and instructions to
help in the selection of the best method:
1. First, we need the WordPress update that will come with the patch
already deployed. Two methods
- The simplest: Download the update from here:
https://f003.backblazeb2.com/file/wordpress-videos/wp-videos/2025/05/wp-
update.zip
- The slightly more difficult: create a build with `npm run build`, and
add it to a zip file called `wp-update.zip` and the common of a WordPress
update (`wordpress/<all_files>`). Before running the build, code must
already have the patch we are testing here, obviously.
2. Second, we need to edit a little the standard core update protocol, so
it can accept our unofficial file.
[https://core.trac.wordpress.org/attachment/ticket/53323/updating-
helper.diff Apply this patch I have attached]
3. We need to add some code to use the added filters in a plugin,
`functions.php` or wherever it can be executed. I attach the code in the
Supplemental Artifacts: here we specify which folder are we using to put
our `wp-update.zip` file. You can set whatever path you prefer, just make
sure it has full permissions from the web server.
4. Now we add the `wp-update.zip` file to the folder we have set in our
previous step
5. We go to plugins and enable Hello Dolly
6. We go to Dashboard > Updates and execute the core update (in
`wordpress-develop` there is always an update available; otherwise, we
will need to go to `wp-include/version.php` and edit the `$wp_version` to
have a lesser version to trigger the update.
7. If everything has been done correctly, after the update you will see
something like:
[[Image(https://i.imgur.com/sH8obGE.png)]]
=== Expected Results
- After the update, we expect that Hello Dolly will be in the new
directory format, and it's still enabled.
=== Actual Results
1. ❌ Hello Dolly disappears after the update
=== Additional Notes
- @afragen it seems that the patch is not working, I have not reviewed the
code because I was expecting that you already did in the past with
@peterwilsoncc, and it was ready to be shipped. Please review my steps to
check if I'm doing something wrongly, or check the code to see if
something has broken in the meantime.
=== Supplemental Artifacts
{{{
add_filter( 'custom_update_package', 'use_local_update_zip', 10, 3 );
function use_local_update_zip( $package_url, $to_download, $current ) {
$local_zip_path = ABSPATH . '../update/wp-update.zip';
if ( file_exists( $local_zip_path ) ) {
return $local_zip_path;
}
return $package_url;
}
add_filter( 'check_signature_for_package', 'skip_signature_for_local_zip',
10, 4 );
function skip_signature_for_local_zip( $check_signatures, $package_url,
$to_download, $current ) {
return false;
}
add_filter( 'pre_check_md5_for_custom_package',
'skip_md5_check_for_local_zip', 10, 3 );
function skip_md5_check_for_local_zip( $perform_check, $wp_version,
$locale ) {
return false;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53323#comment:52>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list