Hello!
I am trying to implement the TFA module into my Drupal site. I followed this blog post to set up my settings:
- http://cjhaas.com/blog/2017/02/14/adding-two-factor-authentication-to-dr...
I completed all steps and all seems fine but once I go to a user profile and try to set up the TFA I have the following mistake:
The website encountered an unexpected error. Please try again later.
Error: Class 'chillerlan\QRCode\QRCode' not found in Drupal\ga_login\Plugin\TfaSetup\GALoginTotpSetup->getQrCodeUri() (line 149 of modules\ga_login\src\Plugin\TfaSetup\GALoginTotpSetup.php).
Drupal\ga_login\Plugin\TfaSetup\GALoginTotpSetup->getQrCodeUri() (Line: 90)
Drupal\ga_login\Plugin\TfaSetup\GALoginTotpSetup->getSetupForm(Array, Object, 0) (Line: 54)
Drupal\tfa\TfaSetup->getForm(Array, Object, 0) (Line: 125)
Drupal\tfa\Form\BasicSetup->buildForm(Array, Object, Object, 'tfa_totp', 0)
call_user_func_array(Array, Array) (Line: 518)
Drupal\Core\Form\FormBuilder->retrieveForm('tfa_setup', Object) (Line: 368)
Drupal\Core\Form\FormBuilder->rebuildForm('tfa_setup', Object, Array) (Line: 625)
Drupal\Core\Form\FormBuilder->processForm('tfa_setup', Array, Object) (Line: 318)
Drupal\Core\Form\FormBuilder->buildForm('tfa_setup', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 44)
Drupal\services\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Am I doing something wrong or forgetting something?
Any help would be appreciated.
Viktor
Comments
Comment #2
JustViktor commentedFound the issue. I just forgot to require the QR code module.
After the command: composer require chillerlan/php-qrcode
Everything is fine now.
Comment #3
JustViktor commentedComment #4
daggerhart commentedAh yes. Thanks for the update. ATM, all the TFA modules basically require composer installation of the module. We have a task in the queue to add ludwig support, but we may need to be a bit more clear about the composer requirement in other places.