You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beim anlegen eines neuen Moduls, kommt eine Fehlermeldung sobald im Dropdown bei "Modultyp" der Punkt "Zwei-Faktor-Authentifizierung" ausgewählt wird.
Fehlermeldung im Browser:
Internal Server Error
Was ist das Problem?
Tried to list template options for the modern fragment type "frontend_module/two_factor" but could not find any template. In case you wanted to use the legacy type "mod_two_factor", define it explicitly in the "template" property of your controller's service tag/attribute.
Im Log: request.CRITICAL: Uncaught PHP Exception LogicException: "Tried to list template options for the modern fragment type "frontend_module/two_factor" but could not find any template. In case you wanted to use the legacy type "mod_two_factor", define it explicitly in the "template" property of your controller's service tag/attribute." at /var/www/clients/client1/web193/web/vendor/contao/core-bundle/src/EventListener/DataContainer/TemplateOptionsListener.php line 85 {"exception":"[object] (LogicException(code: 0): Tried to list template options for the modern fragment type \"frontend_module/two_factor\" but could not find any template. In case you wanted to use the legacy type \"mod_two_factor\", define it explicitly in the \"template\" property of your controller's service tag/attribute. at /var/www/clients/client1/web193/web/vendor/contao/core-bundle/src/EventListener/DataContainer/TemplateOptionsListener.php:85)"} []
The text was updated successfully, but these errors were encountered:
)
Description
-----------
Fixes#5859
The two factor controller is the only fragment controller that does not have a modern template, yet. 🙈 Unfortunately, we cannot really introduce one now without breaking cases where people adjusted the legacy template (this won't work anymore then). The downside is, that we will only be able to move away from this in Contao 6. But as modules should be phased out anyways in the distant future, this might not be such a big problem…
This PR fixes the issue by manually defining the legacy template (`mod_two_factor`) in the controller, effectively overwriting the new default (`frontend_module/two_factor`).
@Kabathus Can you check if this fixes your issue?
Commits
-------
dcb3b55 explicitly set the legacy template
Affected version(s)
5.1
Description
Beim anlegen eines neuen Moduls, kommt eine Fehlermeldung sobald im Dropdown bei "Modultyp" der Punkt "Zwei-Faktor-Authentifizierung" ausgewählt wird.
Fehlermeldung im Browser:
Internal Server Error
Was ist das Problem?
Tried to list template options for the modern fragment type "frontend_module/two_factor" but could not find any template. In case you wanted to use the legacy type "mod_two_factor", define it explicitly in the "template" property of your controller's service tag/attribute.
Im Log:
request.CRITICAL: Uncaught PHP Exception LogicException: "Tried to list template options for the modern fragment type "frontend_module/two_factor" but could not find any template. In case you wanted to use the legacy type "mod_two_factor", define it explicitly in the "template" property of your controller's service tag/attribute." at /var/www/clients/client1/web193/web/vendor/contao/core-bundle/src/EventListener/DataContainer/TemplateOptionsListener.php line 85 {"exception":"[object] (LogicException(code: 0): Tried to list template options for the modern fragment type \"frontend_module/two_factor\" but could not find any template. In case you wanted to use the legacy type \"mod_two_factor\", define it explicitly in the \"template\" property of your controller's service tag/attribute. at /var/www/clients/client1/web193/web/vendor/contao/core-bundle/src/EventListener/DataContainer/TemplateOptionsListener.php:85)"} []
The text was updated successfully, but these errors were encountered: