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.

Comments

Marty2081 created an issue. See original summary.

marty2081’s picture

Issue summary: View changes
marty2081’s picture

Issue summary: View changes
jcnventura’s picture

Issue summary: View changes

The 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.

heshamkh’s picture

StatusFileSize
new761 bytes

Hello @Marty2081, I faced this problem and I created a patch that should fix it
Thanks :)

cmlara’s picture

StatusFileSize
new1.33 KB
new1.31 KB

Attached is a slightly re-worked version of #5, removing duplicate calls to findPlugin() and keeping snake_case to match the variables.

cmlara’s picture

Status: Active » Needs review

  • cmlara committed c09caad4 on 8.x-1.x
    Issue #3333019 by cmlara, heshamkh, Marty2081, jcnventura: Incorrect...
cmlara’s picture

Status: Needs review » Fixed

  • cmlara committed decced95 on 8.x-1.x
    Revert "Issue #3333019 by cmlara, heshamkh, Marty2081, jcnventura:...
cmlara’s picture

Status: Fixed » Needs work

Reverted 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.

  • cmlara committed 29023d88 on 8.x-1.x
    Issue #3333019 by cmlara, heshamkh, Marty2081, jcnventura: Incorrect...
cmlara’s picture

Status: Needs work » Fixed

The error observed in #11 was caused by local uncommitted code. Back to fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.