Channels not shown on Mattermost 7.1

Hi,
On Mattermost 5.x, all channels (public and private, if participated) are shown on the side bar. But on Mattermost 7.1, they are gone. Every time I need to go to a channel, I have to click on Find Channels and do a search.
I already clicked on the Filter icon to show all channels, no change.
I’ve just upgraded from 5.x to 7.1, not sure there’s a missing config or not. Please show me, thanks.

Hi @tommysyd and welcome to the Mattermost forums!

I’ve seen this error quite often and it always happens when the mandatory upgrade path is not adhered to.
To cite the important upgrade notes:

When upgrading to 7.x from a 5.x release please make sure to upgrade to 5.37.10 first for the upgrade to complete successfully.

Could it be that you upgraded from a version older than 5.37.10? If so, you would have to manually fix the database now. To do that, shut down your Mattermost application server, connect to your database and run the following queries:

ALTER TABLE channelmembers ALTER COLUMN mentioncountroot SET DEFAULT '0'::bigint;
UPDATE channelmembers SET mentioncountroot=0 WHERE mentioncountroot IS NULL;
ALTER TABLE channelmembers ALTER COLUMN msgcountroot SET DEFAULT '0'::bigint;
UPDATE channelmembers SET msgcountroot=0 WHERE msgcountroot IS NULL;
ALTER TABLE channels ALTER COLUMN totalmsgcountroot SET DEFAULT '0'::bigint;
UPDATE channels SET totalmsgcountroot=0 WHERE totalmsgcountroot IS NULL;

Then start the database server again and let me know if this helped.
If it did not, please check your Mattermost application server’s logfile (usually located at /opt/mattermost/logs/mattermost.log) and post the lines since starting your server here.