WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 5 weeks ago

#53323 assigned enhancement

Place Hello Dolly in containing folder

Reported by: afragen Owned by: afragen
Milestone: 5.9 Priority: normal
Severity: normal Version: 5.8
Component: Upgrade/Install Keywords: has-patch needs-testing
Focuses: Cc:

Description

Currently Hello Dolly is installed as a single file plugin during a WP core installation. According to Plugin Handbook Best Practices, plugins should be in containing folders. https://developer.wordpress.org/plugins/plugin-basics/best-practices/#folder-structure

This is a simple PR to fix this issue with Hello Dolly. Having this means that things like r51064 are not necessary.

Related #49338

Change History (20)

This ticket was mentioned in PR #1330 on WordPress/wordpress-develop by afragen.


8 weeks ago

Currently Hello Dolly is installed as a single file plugin during a WP core installation. According to Plugin Handbook Best Practices, plugins should be in containing folders. https://developer.wordpress.org/plugins/plugin-basics/best-practices/#folder-structure

This is a simple PR to fix this issue with Hello Dolly. Having this means that things like r51064 are not necessary.

Related #49338

Trac ticket: https://core.trac.wordpress.org/ticket/53323

This ticket was mentioned in Slack in #core by afragen. View the logs.


8 weeks ago

#3 @afragen
8 weeks ago

  • Keywords needs-unit-tests added

Looks like it needs an update to some of the unit tests.

#4 @afragen
8 weeks ago

  • Keywords needs-unit-tests removed

Tests updated

#5 @SergeyBiryukov
8 weeks ago

Perhaps we should also add hello.php to the $_old_files array in wp-admin/includes/update-core.php, so that those who upgrade from previous WordPress version don't get two copies of the plugin.

Version 0, edited 8 weeks ago by SergeyBiryukov (next)

#6 @afragen
8 weeks ago

I can do that tomorrow.

#7 @afragen
8 weeks ago

  • Owner set to afragen

@SergeyBiryukov all recommendations have been added to PR, tests pass 😉

This ticket was mentioned in Slack in #core-auto-updates by afragen. View the logs.


7 weeks ago

#9 @afragen
7 weeks ago

  • Milestone changed from Awaiting Review to 5.9

#10 follow-up: @afragen
7 weeks ago

This may actually require the version of Hello Dolly in the plugin repository to be updated to add the header

Text Domain: hello-dolly

This ticket was mentioned in Slack in #core by afragen. View the logs.


7 weeks ago

#12 @afragen
7 weeks ago

  • Keywords needs-testing added

In testing, if there is a plugin at hello-dolly/hello.php, updating core, using WP Beta Tester, does not install a new version of hello.php. This should mean that if a user has the older hello.php installed, an update will not over-write the plugin.

Might need more testing, but I think Hello Dolly is only installed in a new installation, not in a update. Therefore anyone who has Hello Dolly installed wouldn't see a change until they updated it, where the plugin repository would install a version in a containing folder.

Last edited 7 weeks ago by afragen (previous) (diff)

#13 @afragen
7 weeks ago

  • Milestone changed from 5.9 to 5.8

This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.


6 weeks ago

This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.


6 weeks ago

This ticket was mentioned in Slack in #core-test by pbearne. View the logs.


6 weeks ago

#17 @justinahinon
6 weeks ago

Thank you for explaining how to test @afragen.

During the test team triage on June 16th, we came through others tests scenarios that might be worth being explored:

  • On an existing installation, updating WordPress Core (with the patch applied) should leave Hello Dolly as a single file
  • On fresh WordPress installation (with the patch applied), Hello Dolly should be in the hello-doly folder

These are the scenarios we are sure about based on the explanations on the ticket.

Now, those that still need to be clarified:

  • What happen when updating the Hello Dolly that's a single file? Should it be left in a single file or moved to the directory?
  • If it is already activated on an existing install, what happens when it's moved? Does it stay activated? Can it cause fatal error then?

Cc @hellofromtonya @boniu91 @pbearne.

#18 in reply to: ↑ 10 @SergeyBiryukov
6 weeks ago

Replying to afragen:

This may actually require the version of Hello Dolly in the plugin repository to be updated to add the header

Text Domain: hello-dolly

Just noting that Hello Dolly's headers are historically also included in core language files, which will probably be redundant if we move forward with adding the Text Domain header to the plugin.

So if Hello Dolly's translations will be loaded separately as for any other plugin, we might need to remove them from core language files. I don't remember off the top of my head where the code that generates them is located, this will need more investigation.

This ticket was mentioned in Slack in #core-test by engahmeds3ed. View the logs.


5 weeks ago

#20 @desrosj
5 weeks ago

  • Milestone changed from 5.8 to 5.9

I'm going to punt this to 5.9 as there are unfortunately too many other tickets that must be addressed in 5.8 and time is running out.

Note: See TracTickets for help on using tickets.