I get the same no discussions found but strangely it only happened when I added a second category in my test environment and now it’s stuck at showing that to users until the sign in.
I just updated from 3.3 to the newly released version 12 and I am having the same issues that only the primary admin can see anything and secondary admins cannot see anything nor can users. I am going to try the SQL fix to see if that helps and Ill report back!
So I cannot save any category permissions now I get the face of death and everyone seems to have access to everything including admin categories that I see only admins have access to, even Guests have access to these categories! Any ideas?
I just know that it's a server issue, but it is unclear right now what exactly the problem is. The litespeed might be the problem. What's your server config?
So after doing some offline chatting with @R_J we have found an issue for me. When I did my upgrade form 3.3 to Vanilla 2021.012 I ran the update script as instructed but I remember seeing the "sad face of death" for like 2 seconds then it returned to the site. After enabling debug mode and then running the /utility/structure command again it told me that a bunch of stuff was not updated (See below) so I ran the utility and the error below barfed up! Any help would be appreciated!
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
update `GDN_User` `User`
set `Permissions` = '[]'
where `UserID` = '20941';
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
alter table `GDN_Category`
-- [Existing: `CategoryID` int null, New: `CategoryID` int not null auto_increment]
change `CategoryID` `CategoryID` int not null auto_increment,
-- [Existing: `Depth` int null, New: `Depth` int not null default 0]
change `Depth` `Depth` int not null default 0,
-- [Existing: `CountCategories` int null, New: `CountCategories` int not null default 0]
change `CountCategories` `CountCategories` int not null default 0,
-- [Existing: `CountDiscussions` int null, New: `CountDiscussions` int not null default 0]
change `CountDiscussions` `CountDiscussions` int not null default 0,
-- [Existing: `CountAllDiscussions` int null, New: `CountAllDiscussions` int not null default 0]
change `CountAllDiscussions` `CountAllDiscussions` int not null default 0,
-- [Existing: `CountComments` int null, New: `CountComments` int not null default 0]
change `CountComments` `CountComments` int not null default 0,
-- [Existing: `CountAllComments` int null, New: `CountAllComments` int not null default 0]
change `CountAllComments` `CountAllComments` int not null default 0,
-- [Existing: `LastCategoryID` int null, New: `LastCategoryID` int not null default 0]
change `LastCategoryID` `LastCategoryID` int not null default 0,
-- [Existing: `AllowDiscussions` int null, New: `AllowDiscussions` tinyint not null default 1]
change `AllowDiscussions` `AllowDiscussions` tinyint not null default 1,
-- [Existing: `Archived` int null, New: `Archived` tinyint not null default 0]
change `Archived` `Archived` tinyint not null default 0,
-- [Existing: `CanDelete` int null, New: `CanDelete` tinyint not null default 1]
change `CanDelete` `CanDelete` tinyint not null default 1,
-- [Existing: `Name` mediumtext null, New: `Name` mediumtext(255) not null]
change `Name` `Name` mediumtext(255) not null,
-- [Existing: `UrlCode` mediumtext null, New: `UrlCode` mediumtext(255) null]
change `UrlCode` `UrlCode` mediumtext(255) null,
-- [Existing: `Description` mediumtext null, New: `Description` mediumtext(500) null]
change `Description` `Description` mediumtext(500) null,
-- [Existing: `CssClass` mediumtext null, New: `CssClass` mediumtext(50) null]
change `CssClass` `CssClass` mediumtext(50) null,
-- [Existing: `Photo` mediumtext null, New: `Photo` mediumtext(255) null]
change `Photo` `Photo` mediumtext(255) null,
add `BannerImage` varchar(255) null after `Photo`,
-- [Existing: `PermissionCategoryID` int null, New: `PermissionCategoryID` int not null default -1]
change `PermissionCategoryID` `PermissionCategoryID` int not null default -1,
-- [Existing: `PointsCategoryID` int null, New: `PointsCategoryID` int not null default 0]
change `PointsCategoryID` `PointsCategoryID` int not null default 0,
-- [Existing: `HideAllDiscussions` int null, New: `HideAllDiscussions` tinyint not null default 0]
change `HideAllDiscussions` `HideAllDiscussions` tinyint not null default 0,
-- [Existing: `DisplayAs` mediumtext null, New: `DisplayAs` mediumtext('Categories','Discussions','Flat','Heading','Default') not null default 'Discussions']
change `DisplayAs` `DisplayAs` mediumtext('Categories','Discussions','Flat','Heading','Default') not null default 'Discussions',
-- [Existing: `InsertUserID` int null, New: `InsertUserID` int not null]
change `InsertUserID` `InsertUserID` int not null,
-- [Existing: `DateInserted` mediumtext null, New: `DateInserted` mediumtext not null]
change `DateInserted` `DateInserted` mediumtext not null,
-- [Existing: `DateUpdated` mediumtext null, New: `DateUpdated` mediumtext not null]
change `DateUpdated` `DateUpdated` mediumtext not null,
-- [Existing: `AllowedDiscussionTypes` mediumtext null, New: `AllowedDiscussionTypes` mediumtext(255) null]
change `AllowedDiscussionTypes` `AllowedDiscussionTypes` mediumtext(255) null,
-- [Existing: `DefaultDiscussionType` mediumtext null, New: `DefaultDiscussionType` mediumtext(10) null]
change `DefaultDiscussionType` `DefaultDiscussionType` mediumtext(10) null,
add `Featured` tinyint not null default 0 after `DefaultDiscussionType`,
add `SortFeatured` int not null default 0 after `Featured`;
alter table `GDN_Category`
add primary key (`CategoryID`), algorithm=inplace, lock=none;
alter table `GDN_Category`
add key FK_Category_ParentCategoryID (`ParentCategoryID`), algorithm=inplace, lock=none;
alter table `GDN_Category`
add key FK_Category_InsertUserID (`InsertUserID`), algorithm=inplace, lock=none;
alter table `GDN_Category`
add index IX_Category_SortFeatured (`SortFeatured`), algorithm=inplace, lock=none;
alter table `GDN_Discussion`
add `hot` int not null default 0 after `RegardingID`;
alter table `GDN_Discussion`
add index IX_Discussion_Announce (`Announce`), algorithm=inplace, lock=none;
alter table `GDN_Discussion`
add index IX_Discussion_Score (`Score`), algorithm=inplace, lock=none;
alter table `GDN_Discussion`
add index IX_Discussion_hot (`hot`), algorithm=inplace, lock=none;
alter table `GDN_UserDiscussion`
add index IX_UserDiscussion_UserID_Bookmarked (`UserID`, `Bookmarked`), algorithm=inplace, lock=none;
alter table `GDN_Comment`
add index IX_Comment_InsertUserID_DiscussionID (`InsertUserID`, `DiscussionID`), algorithm=inplace, lock=none;
alter table `GDN_Permission`
add `Vanilla.Discussions.CloseOwn` tinyint not null default 0 after `Vanilla.Comments.Me`;
update `GDN_Permission` `Permission`
set `Vanilla.Discussions.CloseOwn` = '2'
where `RoleID` = '0'
and `JunctionTable` is null
and `JunctionColumn` is null;
update `GDN_Permission` `Permission`
set `Vanilla.Discussions.CloseOwn` = 0
where `RoleID` <> '0'
and `JunctionTable` is null;
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
alter table `GDN_Permission` drop column `Vanilla.Spam.Manage`;
update `GDN_Category` `Category`
set `UrlCode` = 'root'
where `CategoryID` = '-1';
create table `GDN_dirtyRecord` (
`recordType` varchar(50) not null,
`recordID` int not null,
`dateInserted` datetime not null,
primary key (`recordType`, `recordID`),
index `IX_dirtyRecord_recordType` (`recordType`, `dateInserted`)
) engine=innodb default character set utf8mb4 collate utf8mb4_unicode_ci;
update `GDN_Discussion` `Discussion`
set `hot` = 0 + COALESCE(Score, 0) + COALESCE(CountComments, 0);
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
alter table `GDN_Category`
-- [Existing: `UnreadPhoto` mediumtext null, New: `UnreadPhoto` mediumtext(255) null]
change `UnreadPhoto` `UnreadPhoto` mediumtext(255) null;
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
insert `GDN_UserMeta`
(`UserID`, `Name`, `Value`)
values ('0', 'stubcontent.record.locale', 'en');
update `GDN_User` `User`
set `Permissions` = ''
where `Permissions` <> '';
Fatal Error in PHP.gdn_ErrorHandler();
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(255) not null, -- [Existing: `UrlCode` mediumtext null, New: `UrlCode` mediumte' at line 25
The error occurred on or near: /home/mainnu/www/pokerforum.ca/library/database/class.database.php
499:
500: // If we get here then the pdo statement prepared properly.
501: break;
502: } catch (Gdn_UserException $uex) {
503: trigger_error($uex->getMessage(), E_USER_ERROR);
504: } catch (Exception $ex) {
505: list($state, $code, $message) = $pDO->errorInfo();
506:
507: // If the error code is consistent with a disconnect, attempt to retry
Well I did a backup and started to run the SQL commands 1by1 and found the error to be in the first section for
alter table GDN_Category
and it does not like the line
Line 24: -- [Existing: `Name` mediumtext null, New: `Name` mediumtext(255) not null]
Line 25: change `Name` `Name` mediumtext(255) not null,
Error code form MySQL
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(255) not null,
-- [Existing: `UrlCode` mediumtext null, New: `UrlCode` mediumt' at line 25
When looking at the databases table's current structure the name column is a mediumtext() and set to NULL.
It seems like everywhere else in the script is not null is used that a default is specified after it. hope this helps narrow the problem down
There might be something wrong with the code the generates the MySQL update script as there is a lot wrong compared to what the construct thinks it should be!
So it seems my GDN_Catagory database table was in limbo it had no primary key set on it. For some reason some columns could not update like DisplayAs because the first row had no value for it and the SQL said cant be NULL and must be one of these ENUM values. Also the dateCreated and dateModified were mostly blank and that was throwing an error as the new construct wanted the to be a value. After manually massaging the MySQL code and the database table I got the script to run. I then ran the update utility and got the Happy face of Success
I was an importer from another forum and I am wondering when that data got brought in maybe some of these fields were not required so they were blank in the database.
Depending on what plugins you are using, that might not directly work because some columns are only created when a plugin is activated. If that's the case do the following. Somewhere at the top of your /conf/config.php is a section "// Database" where your current database credentials are. Change them to point to the freshly imported blank database structure. After that go to the plugins section in your dashboard and disable and re-enable all of your plugins.
After that, you should be able to import the content of your old database into the clean structure and since you already changed the database which is in use in the last step, you should be able to see all the content of the forum again.
Your forum will be all messed up during this steps, so you should set it in maintenance mode: add $Configuration['Garden']['UpdateMode'] = true; to your /conf/config.php before you start and until you are finished. Then set the value to false
Comments
I get the same no discussions found but strangely it only happened when I added a second category in my test environment and now it’s stuck at showing that to users until the sign in.
I just updated from 3.3 to the newly released version 12 and I am having the same issues that only the primary admin can see anything and secondary admins cannot see anything nor can users. I am going to try the SQL fix to see if that helps and Ill report back!
The fix by @rbrahmson has fixed my issues and reset my permissions. I will now try to set all my permissions up again and report back any finding!
So I cannot save any category permissions now I get the face of death and everyone seems to have access to everything including admin categories that I see only admins have access to, even Guests have access to these categories! Any ideas?
I just know that it's a server issue, but it is unclear right now what exactly the problem is. The litespeed might be the problem. What's your server config?
@R_J What do you need I'll get it for you to help figure this out? I can PM you my phpinfo(); if you like?
So after doing some offline chatting with @R_J we have found an issue for me. When I did my upgrade form 3.3 to Vanilla 2021.012 I ran the update script as instructed but I remember seeing the "sad face of death" for like 2 seconds then it returned to the site. After enabling debug mode and then running the /utility/structure command again it told me that a bunch of stuff was not updated (See below) so I ran the utility and the error below barfed up! Any help would be appreciated!
Fatal Error in PHP.gdn_ErrorHandler();
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(255) not null, -- [Existing: `UrlCode` mediumtext null, New: `UrlCode` mediumte' at line 25
The error occurred on or near: /home/mainnu/www/pokerforum.ca/library/database/class.database.php
Backtrace:
Variables in local scope:
Maybe you could update to vanilla 2021.0012…https://github.com/vanilla/vanilla/releases/tag/2021.012
@pioc34 That IS the version I just updated to ;)
@MrCaspan sorry
Question for any Devs? Is it okay to run these commands individually outside of the script on my phpMyAdmin page?
Well I did a backup and started to run the SQL commands 1by1 and found the error to be in the first section for
and it does not like the line
Error code form MySQL
When looking at the databases table's current structure the name column is a mediumtext() and set to NULL.
It seems like everywhere else in the script is not null is used that a default is specified after it. hope this helps narrow the problem down
What's interesting that @R_J points out is that my code is trying the change the Name column to mediumtext(255) when the code says varchar(255)
So why is my /utility/structure showing mediumtext(255)?
Wow my whole MySQL code that needs to be run is so different form the construct specified in /applications/vanilla/settings/structure.php
Look at this MySQL statement it is so broken!
For instance one that pops right out to me is
Its defining a mediumtext as a list of options
if you look at the construct for it
There might be something wrong with the code the generates the MySQL update script as there is a lot wrong compared to what the construct thinks it should be!
Have you inspected your database what type your columns are? I assume they are of type mediumtext and the script is seemingly not able to change that.
You can do three things, I'd say.
So it seems my GDN_Catagory database table was in limbo it had no primary key set on it. For some reason some columns could not update like DisplayAs because the first row had no value for it and the SQL said cant be NULL and must be one of these ENUM values. Also the dateCreated and dateModified were mostly blank and that was throwing an error as the new construct wanted the to be a value. After manually massaging the MySQL code and the database table I got the script to run. I then ran the update utility and got the Happy face of Success
I was an importer from another forum and I am wondering when that data got brought in maybe some of these fields were not required so they were blank in the database.
one thing though when I run the /utility/structure again I still get this below, no matter how many times I run it and no errors it comes back
Don't worry about that. The commands will never disappear. But they normally do nor show up duplicated. Maybe you need to inspect the User table, too
New problem users have the permission to post but are not given the permission to post when visiting the page
@MrCaspan I strongly advice to clean up your database. If there is one quirk, it's hard to tell what else is wrong and really causing issues.
I've exported a clean database structure where you can import your data into.
Depending on what plugins you are using, that might not directly work because some columns are only created when a plugin is activated. If that's the case do the following. Somewhere at the top of your /conf/config.php is a section "// Database" where your current database credentials are. Change them to point to the freshly imported blank database structure. After that go to the plugins section in your dashboard and disable and re-enable all of your plugins.
After that, you should be able to import the content of your old database into the clean structure and since you already changed the database which is in use in the last step, you should be able to see all the content of the forum again.
Your forum will be all messed up during this steps, so you should set it in maintenance mode: add
$Configuration['Garden']['UpdateMode'] = true;
to your /conf/config.php before you start and until you are finished. Then set the value tofalse