-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin fails to activate using TGMPA #6459
Comments
Hi @ktmn thanks for reporting the bug. The issue seems to be how the TGMPA plugin activates plugins. By the time it calls I'm not sure how to resolve this correctly. Maybe if a service is delayed and depends upon another service wait for the dependent service to be registered first? Any thoughts @westonruter @schlessera? |
@pierlon We can add dependency resolution to the services, so that the services can state which other services they depend on, and only get registered once all dependencies are met. I've done that in the past on more complex projects, and it works very well. It also allows you to define "virtual services" whose only purpose is to serve as a dependency, like a (see this and the following slides for a case study of how I solved that in the past: https://schlessera.github.io/wcldn-2017/#/dependency-resolution-1) |
Dependency resolution for the services sounds perfect for the job. Also thanks for sharing those slides! |
@schlessera something like described as part of ampproject/amp-toolbox-php#219? |
@westonruter It would probably need to be a little more robust, but generally yes. Is this something you want me to take on, at least for the initial design? |
@schlessera yes, please do. Up until now there has been a need to order the services in a specific way to avoid such dependency resolution problems. @pierlon Maybe you'd like to implement this with input from Alain? |
Sure that sounds like a plan. |
@ktmn The fix has been merged and cherry-picked into the |
@pierlon @schlessera There seems to be a regression introduced with #6484. In particular, the I checked in both in the |
Works for me, thanks! |
QA Passed I added the “Activate AMP Plugin” plugin as described in #6484: Upon activating, the AMP plugin was also activated successfully: Nothing is added to the error log. |
Bug Description
When trying to activate the plugin using TGMPA I get the following error:
Expected Behaviour
It used to work with TGMPA I think.
Steps to reproduce
/wp-content/mu-plugins/TGM-Plugin-Activation-2.6.1
$plugins
variable in/mu-plugins/TGM-Plugin-Activation-2.6.1/example.php
to:/mu-plugins/tgmpa.php
with the content<?php require_once __DIR__ . '/TGM-Plugin-Activation-2.6.1/example.php';
Screenshots
Additional context
Site health:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: