#61294 closed defect (bug) (fixed)
Plugin Dependencies: Ensure dependency detection for newly installed plugins
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.5.4 | Priority: | normal |
| Severity: | normal | Version: | 6.5 |
| Component: | Plugins | Keywords: | has-patch has-test-info commit fixed-major dev-reviewed |
| Focuses: | Cc: |
Description
[57658] removed auto-deactivation and bootstrapping logic from the Plugin Dependencies feature. In doing so, initialization calls were added to various locations in Core to ensure dependencies were detected and ready to be checked. However, an initialization call was missed in the AJAX callback before checking plugin dependencies.
This means that a plugin's dependencies may not be detected, and lead to a false positive, which in turn allows the user to click Activate only to see a failure message.
Steps to reproduce
- Go to
Plugins > Add New Plugin. - Search
WooCommerce, and find a plugin that requires it. - Click on WooCommerce's "More details" link in the "Additional plugins are required" notice.
- Click
Install Nowin the modal. - Close the modal.
- Refresh.
- Click
Install Nowon the dependent. - ๐ Once installed, it'll have a clickable
Activatebutton, and when clicked, will fail. - ๐ Opening DevTools > Network, the final admin-ajax.php entry will show a response including "This has no required plugins", which is obviously incorrect.
When testing a patch to validate it works as expected:
- โ
The
Activatebutton should not be clickable.
Change History (15)
This ticket was mentioned in โPR #6630 on โWordPress/wordpress-develop by โ@costdev.
19 months ago
#1
#3
@
19 months ago
Aha, that's why I kept seeing "Activation failed" state rather than the "Activate" button being unavailable, i.e. when testing #61269.
#4
@
19 months ago
- Keywords needs-testing removed
Test Report
Patch tested: โhttps://github.com/WordPress/wordpress-develop/pull/6630
Steps to Reproduce or Test
Starting state: WooCommerce is installed, but not activated.
I tested this as part of my #61269 testing.
- Click
Install Nowon any of the plugins requiring WooCommerce as their dependency. - ๐ Once installed, it'll have a clickable
Activatebutton, and when clicked, will fail. - ๐ Opening DevTools > Network, the final
admin-ajax.phpentry will show a response including "This has no required plugins", which is obviously incorrect.
Expected Results
When testing a patch to validate it works as expected:
- โ The "Activate" button should be disabled.
When reproducing a bug:
- โ ๐ Once installed, it'll have a clickable
Activatebutton, and when clicked, will fail. - โ ๐ Opening DevTools > Network, the final
admin-ajax.phpentry will show a response including "This has no required plugins", which is obviously incorrect.
Environment
OS: macOS
Browser: Firefox 126.0
Web server: nginx
PHP: 8.3
Installed Plugins: WooCommerce 8.9.1
Activated Plugins: none
Theme: TT4
Actual Results
When reproducing a bug/defect:
- โ ๐ After installing any of the WooCommerce add-ons that require WooCommerce to be activated first, the
Activatebutton is available and, after clicking, fails with a "Activation failed." error.
When testing the bugfix patch:
- โ Issue resolved with patch.
I'm able to reproduce the reported issue. Confirmed the patch resolves it.
#5
@
19 months ago
- Keywords commit added
Patch: โhttps://github.com/WordPress/wordpress-develop/pull/6630
LGTM and is ready for commit.
#6
@
19 months ago
- Owner set to hellofromTonya
- Status changed from new to reviewing
Self-assigning for commit after thumbs up to include in 6.5.4 from @jorbin.
โ@hellofromTonya commented on โPR #6630:
19 months ago
#8
#10
@
19 months ago
- Keywords dev-feedback added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for 2nd committer sign-off to backport [58252] to the 6.5-branch.
โ@hellofromTonya commented on โPR #6630:
19 months ago
#11
Committed via https://core.trac.wordpress.org/changeset/58252.
Additional props to @kevinwhoffman for discovering this issue and @afragen for early testing of the patch.