Problem/Motivation
The plugin ID check implemented in #3125484: Do not allow invalid plugin ID on tfa.validation.setup form breaks (custom) plugins, because it re-introduces the implicit requirement of a setup plugin id that ends with "_setup" that was removed in 2020 in #2925066: Refactor implicitly named setup plugin id expectations to an annotation property.
Steps to reproduce
Update the TFA module on a site that has a setup plugin that does not have an id that ends with "_setup".
Proposed resolution
Do not check the plugin ID by checking if its setup plugin ID ends with "_setup", but actually check if the setup plugin is a TFA (setup) plugin instead.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3333019-incorrect_plugin_id-6.patch | 1.31 KB | cmlara |
| #6 | interdiff-3333019-5-6.txt | 1.33 KB | cmlara |
| #5 | tfa-fix-setup-plugincheck.patch | 761 bytes | heshamkh |
Comments
Comment #2
marty2081 commentedComment #3
marty2081 commentedComment #4
jcnventuraThe exception introduced in #3125484: Do not allow invalid plugin ID on tfa.validation.setup form needs to be kept. What needs to be done is to do a proper check if the current plugin being called has a defined setup plugin, or else the unexpected WSOD reported in that issue will come back.
A few lines below, in https://git.drupalcode.org/project/tfa/-/blob/8.x-1.x/src/Form/TfaSetupF..., there is already some code doing this that can simply be moved to the start.
Comment #5
heshamkh commentedHello @Marty2081, I faced this problem and I created a patch that should fix it
Thanks :)
Comment #6
cmlaraAttached is a slightly re-worked version of #5, removing duplicate calls to findPlugin() and keeping snake_case to match the variables.
Comment #7
cmlaraComment #9
cmlaraComment #11
cmlaraReverted as I observed an issue during plugin setup that the seed is rotating causing setup validation to fail.
Will need to look closer into the execution path to evaluate why.
Comment #13
cmlaraThe error observed in #11 was caused by local uncommitted code. Back to fixed.