Within the tfa.module on line 34 it implements hook_block_access. This is set to disable all access to the standard user_login_block.
The problem is it currently also stops you editing/removing/disabling any existing user login blocks you might already have on your site before enabling the tfa module. It's not a major issue but just means you've got a item in the block listing that can't be removed.
Could this check be altered with something like:
if (\Drupal::config('tfa.settings')->get('enabled') && $block->getPluginId() === 'user_login_block' && $operation != 'update' && $operation != 'delete') {
That should let you remove any existing blocks without causing the block to actually be used anywhere
Issue fork tfa-3058122
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
msypes commentedThis can be a significant issue. I had created a login block shortly before adding this module, and realized it was gone/broken.
I'm not sure whether a patch is in order, but in order to fix the issue, I temporary added in the extra code as @maseyuk described, deleted the regular login block and put in the new tfa block. Then I removed the additional code.
Thanks!
Comment #3
marciaibanezI'll work on this.
Comment #4
marciaibanezComment #6
marciaibanezHi! I made the reported changes in the code, please let me know if I did something wrong or if there's anything else I can do to help. Kindly review it.
Comment #7
marciaibanezComment #8
Guilherme Rabelo commentedHi, i will review this.
Comment #9
Guilherme Rabelo commentedHi, the last commit made by @marciaibanez fixed the problem.
I created a block user login and then i enabled the module. I did tests performing the editing and removal of the block and my site did not break. Now a item in the block listing can be removed, edited and disabled. Everything seems to be right.
Moving to RTBC!
Comment #12
jcnventura