?
avatar PhilETaylor
PhilETaylor
17 Aug 2020

Steps to reproduce the issue

Install Joomla 4.0-dev
Login
Visit Post Installlation Messages
Click Enable two factor authentication button

Screenshot 2020-08-17 at 12 26 25

EDIT: ENABLE YOUR JOOMLA CACHE in Joomla Global Config

Go to plugins and note that the plugins ARE ENABLED

Go to your User Menu -> Edit Account

Expected result

Two Factory Authentication Tab available

Actual result

No Two Factory Authentication Tab available

HOWEVER, then go and edit and SAVE (with no changes) the 2fa plugins again, then the tab will be available.

Im guessing the SQL that the "Enable two factor authentication" button runs is not setting all fields in the db correctly - is this a null issue again?

avatar PhilETaylor PhilETaylor - open - 17 Aug 2020
avatar joomla-cms-bot joomla-cms-bot - change - 17 Aug 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Aug 2020
avatar SharkyKZ
SharkyKZ - comment - 18 Aug 2020

I can't reproduce the issue. The query only updates one column. I don't see how null values could be an issue here:

$query = $db->getQuery(true)
->update($db->quoteName('#__extensions'))
->set($db->quoteName('enabled') . ' = ' . $db->quote(1))
->where($db->quoteName('type') . ' = ' . $db->quote('plugin'))
->where($db->quoteName('folder') . ' = ' . $db->quote('twofactorauth'));
$db->setQuery($query);
$db->execute();

avatar alikon
alikon - comment - 18 Aug 2020

the only thing which could be wrong is that the enabled field is declare as

`enabled` tinyint(3) NOT NULL DEFAULT 0,

https://github.com/joomla/joomla-cms/blob/4.0-dev/installation/sql/mysql/base.sql#L121

so

->set($db->quoteName('enabled') . ' = ' . $db->quote(1))

should be

->set($db->quoteName('enabled') . ' = 1')

avatar PhilETaylor
PhilETaylor - comment - 18 Aug 2020

Enable Joomla Cache. Test again. = Broken.

Its a caching issue. The cache needs flushing after the enabled is changed - else it doesn't show the tab

avatar PhilETaylor PhilETaylor - change - 18 Aug 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 18 Aug 2020
avatar alikon alikon - change - 19 Aug 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-08-19 08:36:55
Closed_By alikon
avatar alikon alikon - close - 19 Aug 2020
avatar alikon
alikon - comment - 19 Aug 2020

please test #30416

Add a Comment

Login with GitHub to post a comment