Undefined index: last_post_username (?)

I tried that too, but I still get an error adding this: 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';

sqlpage1.webp
 
Sorry, I've messed up. Forgot to add "ADD" for last 2 fields. Correct query:
Code:
ALTER TABLE xf_forum ADD discussion_count INT UNSIGNED NOT NULL DEFAULT 0, ADD last_post_username VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'Username of most recently-posting user', ADD find_new TINYINT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Include posts from this forum when running /find-new/threads';
 
Strange. I don't see discussion_count field in screenshot. Oh well, just remove that field from sql query to add other 2:
Code:
ALTER TABLE xf_forum ADD last_post_username VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'Username of most recently-posting user', ADD find_new TINYINT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Include posts from this forum when running /find-new/threads';
 
Strange. I don't see discussion_count field in screenshot. Oh well, just remove that field from sql query to add other 2:
Code:
ALTER TABLE xf_forum ADD last_post_username VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'Username of most recently-posting user', ADD find_new TINYINT UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Include posts from this forum when running /find-new/threads';

Still getting a duplicate entry. :cry:
sqlpage3.webp
 
Update. The issue has been solved. After taking a look at the table I saw that the node_id was present in the table in spite of being reported as missing at the error screenshot. However another field was missing which was not shown in the error log. A very strange issue. But the most important thing is that the issue has been dealt with and Blueprint4Love 's forum is back up and running again.
 
Wow, Borbole, you never cease to amaze me. You've come to my rescue several times since my life with XF. Can't thank you enough! Totally trust you with my login info, always have, cause you're just a great guy.

Arty, you've been wonderful too! Thank you for your giving and caring!
 
Top Bottom