Error updating 3.1.7 to 4.0.10

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
KT_
Posts: 28
Joined: Tue Nov 21, 2017 5:28 pm

Error updating 3.1.7 to 4.0.10

Post by KT_ »

I've been using phpMyFAQ for many years, and try to upgrade regularly. Usually it goes (relatively) smoothly, aside of a few tweaks and bit of debugging here and there. But today I'm running into difficulty updating from 3.1.7 to 4.0.10.

I'm getting an error in update.js, at: await fetch("../api/setup/check"...
Screenshot 2025-08-29 at 3.04.17 PM.png
It's resulting in a 500 error for 'check':
Screenshot 2025-08-29 at 3.04.31 PM.png
I've got RewriteBase configured properly in .htaccess. (My installation is at myserver.com/kb/, so it's RewriteBase /kb/) It's properly routing /update, so I assume it's working. So I'm at a loss as to why it's not able to find /check, when .htaccess has the default:

Code: Select all

RewriteRule ^api/setup/(check|backup|update-database) api/index.php
That hasn't been changed. Am I missing something obvious? (I mean, I'm probably missing something obvious.)
You do not have the required permissions to view the files attached to this post.
KT_
Posts: 28
Joined: Tue Nov 21, 2017 5:28 pm

Re: Error updating 3.1.7 to 4.0.10

Post by KT_ »

Actually, when I click on the "check" error in Chrome's Network tab I get:

An error occurred: Unknown column 'twofactor_enabled' in 'field list' at line 311 at /[myserver.com]/kb/src/phpMyFAQ/Database/Mysqli.php

So I guess something is looking for a nonexistent column?
KT_
Posts: 28
Joined: Tue Nov 21, 2017 5:28 pm

Re: Error updating 3.1.7 to 4.0.10

Post by KT_ »

I added 'twofactor_enabled' to faquserdata and tried again. This time I got:

Update database failed: Duplicate entry 'layout.enableCookieConsent' for key 'faqconfig.PRIMARY'
Screenshot 2025-08-30 at 12.36.04 PM.png
You do not have the required permissions to view the files attached to this post.
KT_
Posts: 28
Joined: Tue Nov 21, 2017 5:28 pm

Re: Error updating 3.1.7 to 4.0.10

Post by KT_ »

I added 'twofactor_enabled' to faquserdata and tried again. This time I got:

Update database failed: Duplicate entry 'layout.enableCookieConsent' for key 'faqconfig.PRIMARY'
Screenshot 2025-08-30 at 12.36.04 PM.png
You do not have the required permissions to view the files attached to this post.
Post Reply