Cannot edit any articles

Please report bugs here!

Moderator: Thorsten

Post Reply
SpudR
Posts: 13
Joined: Sun Jan 31, 2021 7:47 pm

Cannot edit any articles

Post by SpudR »

Since the latest update to 3.2.3 I cannot update any articles
Clicking the 'edit' link from the article OR trying the 'edit' option from the admin section throws an SQL error:

phpMyFAQ Fatal error
Uncaught exception: 'mysqli_sql_exception'

Message: 'Unknown column 'updated' in 'field list''

#0 [...]FAQs/src/phpMyFAQ/Database/Mysqli.php(308): mysqli->query('SELECT \n ...')
#1 [...]FAQs/src/phpMyFAQ/Revision.php(84): phpMyFAQ\Database\Mysqli->query('SELECT \n ...')
#2 [...]FAQs/admin/record.edit.php(338): phpMyFAQ\Revision->get(539, 'en', '[username]')
#3 [...]FAQs/admin/index.php(352): require('[...]')
#4 {main}
Thrown in '[...]FAQs/src/phpMyFAQ/Database/Mysqli.php' on line 308

the [...] are removed and the [username] is the user name I'm using
Thorsten
Posts: 15565
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Cannot edit any articles

Post by Thorsten »

Hi,

which version did you have before the upgrade?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
SpudR
Posts: 13
Joined: Sun Jan 31, 2021 7:47 pm

Re: Cannot edit any articles

Post by SpudR »

Can't say with 100% certainty but I think it was a 3.1 version.

Just noticed that 'Add a FAQ' also shows the same error...
Thorsten
Posts: 15565
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Cannot edit any articles

Post by Thorsten »

Hi,

this code hasn't changed since 3.1.0, do you have a column "updated" in the table faqdata_revisions?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
SpudR
Posts: 13
Joined: Sun Jan 31, 2021 7:47 pm

Re: Cannot edit any articles

Post by SpudR »

Nope - I have:
New
active
author
commecnt
content
created
date_end
date_start
datum
email
[id]
keywords
[lang]
notes
[revision_id]
[solution_id]
sticky
thema
the [ ] denotes 'keys'
Thorsten
Posts: 15565
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Cannot edit any articles

Post by Thorsten »

Hi,

this is strange as we renamed the column with phpMyFAQ 2.9.0, please run this query:

Code: Select all

ALTER TABLE faqdata_revisions CHANGE datum updated VARCHAR(15) NOT NULL
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
SpudR
Posts: 13
Joined: Sun Jan 31, 2021 7:47 pm

Re: Cannot edit any articles

Post by SpudR »

That seems to have fixed it :)
I can now edit things and it's not throwing an error when I create a new FAQ.

Thanks for the fix!
Post Reply