Undefined index: last_post_username (?)

You most likely have cPanel or similar control panel for your website. Usually such control panels include phpMyAdmin tool, it is an excellent tool to administrate your databases. Find it, open it in browser.

On left side select database where your forum tables are located. On right side it will show you list of tables. Click "SQL" tab on right side, paste that query, click "Go" button.
 
Running a repair of the table it will not help because this is not a crashed table case. That being said, from the error message you posted it looks like you have a missing field in the forum table (last_post_username). Can you go to the phpmyadmin, select the db that your forum is installed at and check the structure for the forum table and see if the field in question is in there or is indeed missing. Hope it helps.
 
3 fields are missing: discussion_count, last_post_username and find_new.

Run this query (click "SQL" tab on right, paste code, click "Go"):
Code:
ALTER TABLE xf_forum ADD discussion_count INT UNSIGNED NOT NULL DEFAULT 0, last_post_username VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'Username of most recently-posting user', find_new TINYINT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Include posts from this forum when running /find-new/threads';
 
Oh no, Borbole, I don't have a backup. How does this even happen. Logged on this morning, logged off for 30 minutes and when I logged back in it was 'gone.'

Tried running the inquiry, Arty, but not sure I did it right. When I click on SQL there is a first line already type in. I tried running your query with that line in tact and get an error, I tried removing that first line and adding what you said and it gives me an error too. :confused:
sqlpage.webp
 
Oh no, Borbole, I don't have a backup. How does this even happen. Logged on this morning, logged off for 30 minutes and when I logged back in it was 'gone.'

Tried running the inquiry, Arty, but not sure I did it right. When I click on SQL there is a first line already type in. I tried running your query with that line in tact and get an error, I tried removing that first line and adding what you said and it gives me an error too. :confused:
View attachment 34268


You should remove that first line from your sql box, that starts with SELECT *....

When you click the sql button to run the query, that box should be empty. There should be no other code in there besides the query that you will run.
 
Back
Top Bottom