HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla 2021.009 no categories found

1356

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.

    pioc34
  • 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!

    aawolverine
  • 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?

  • R_JR_J Ex-Fanboy Munich Admin

    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?

  • MrCaspanMrCaspan
    edited July 9

    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
    

    Backtrace:

    /home/mainnu/www/pokerforum.ca/library/database/class.database.phpPHP::gdn_ErrorHandler();
    [/home/mainnu/www/pokerforum.ca/library/database/class.database.php:503] PHP::trigger_error();
    [/home/mainnu/www/pokerforum.ca/library/database/class.databasestructure.php:474] Gdn_Database->query();
    [/home/mainnu/www/pokerforum.ca/library/database/class.mysqlstructure.php:632] Gdn_DatabaseStructure->executeQuery();
    [/home/mainnu/www/pokerforum.ca/library/database/class.databasestructure.php:538] Gdn_MySQLStructure->_modify();
    [/home/mainnu/www/pokerforum.ca/applications/vanilla/settings/structure.php:98] Gdn_DatabaseStructure->set();
    [/home/mainnu/www/pokerforum.ca/applications/dashboard/models/class.updatemodel.php:711] PHP::include();
    [/home/mainnu/www/pokerforum.ca/applications/dashboard/models/class.updatemodel.php:661] UpdateModel->runStructureInternal();
    [/home/mainnu/www/pokerforum.ca/applications/dashboard/controllers/class.utilitycontroller.php:239] UpdateModel->runStructure();
    [/home/mainnu/www/pokerforum.ca/applications/dashboard/controllers/class.utilitycontroller.php:212] UtilityController->runStructure();
    [/home/mainnu/www/pokerforum.ca/library/core/class.dispatcher.php:933] UtilityController->structure();
    [/home/mainnu/www/pokerforum.ca/library/core/class.dispatcher.php:335] Gdn_Dispatcher->dispatchController();
    [/home/mainnu/www/pokerforum.ca/index.php:29] Gdn_Dispatcher->dispatch();
    

    Variables in local scope:

    [sql] '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`'
    [inputParameters] NULL
    [options] array (
    )
    [returnType] NULL
    [timerName] 'dbWrite'
    [tries] 2
    [pDO] array (
    )
    [try] 0
    [pDOStatement] false
    [state] '42000'
    [code] 1064
    [message] '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'
    [uex] array (
    )
    
  • pioc34pioc34 Pézenas ✭✭

    Maybe you could update to vanilla 2021.0012…https://github.com/vanilla/vanilla/releases/tag/2021.012

    MrCaspan
  • @pioc34 That IS the version I just updated to ;)

  • pioc34pioc34 Pézenas ✭✭

    @MrCaspan sorry

  • Question for any Devs? Is it okay to run these commands individually outside of the script on my phpMyAdmin page?

  • MrCaspanMrCaspan
    edited July 9

    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

  • 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)?

    pinchies
  • MrCaspanMrCaspan
    edited July 9

    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!

    alter table `GDN_Category`
    change `CategoryID` `CategoryID` int not null auto_increment,
    change `Depth` `Depth` int not null default 0,
    change `CountCategories` `CountCategories` int not null default 0,
    change `CountDiscussions` `CountDiscussions` int not null default 0,
    change `CountAllDiscussions` `CountAllDiscussions` int not null default 0,
    change `CountComments` `CountComments` int not null default 0,
    change `CountAllComments` `CountAllComments` int not null default 0,
    change `LastCategoryID` `LastCategoryID` int not null default 0,
    change `AllowDiscussions` `AllowDiscussions` tinyint not null default 1,
    change `Archived` `Archived` tinyint not null default 0,
    change `CanDelete` `CanDelete` tinyint not null default 1,
    change `Name` `Name` mediumtext(255) not null,
    change `UrlCode` `UrlCode` mediumtext(255) null,
    change `Description` `Description` mediumtext(500) null,
    change `CssClass` `CssClass` mediumtext(50) null,
    change `Photo` `Photo` mediumtext(255) null,
    add `BannerImage` varchar(255) null after `Photo`,
    change `PermissionCategoryID` `PermissionCategoryID` int not null default -1,
    change `PointsCategoryID` `PointsCategoryID` int not null default 0,
    change `HideAllDiscussions` `HideAllDiscussions` tinyint not null default 0,
    change `DisplayAs` `DisplayAs` mediumtext('Categories','Discussions','Flat','Heading','Default') not null default 'Discussions',
    change `InsertUserID` `InsertUserID` int not null,
    change `DateInserted` `DateInserted` mediumtext not null,
    change `DateUpdated` `DateUpdated` mediumtext not null,
    change `AllowedDiscussionTypes` `AllowedDiscussionTypes` mediumtext(255) 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`;
    

    For instance one that pops right out to me is

    change `DisplayAs` `DisplayAs` mediumtext('Categories','Discussions','Flat','Heading','Default') not null default 'Discussions',
    

    Its defining a mediumtext as a list of options

    if you look at the construct for it

    $Construct->primaryKey('CategoryID')
        ->column('ParentCategoryID', 'int', true, 'key')
        ->column('TreeLeft', 'int', true)
        ->column('TreeRight', 'int', true)
        ->column('Depth', 'int', '0')
        ->column('CountCategories', 'int', '0')
        ->column('CountDiscussions', 'int', '0')
        ->column('CountAllDiscussions', 'int', '0')
        ->column('CountComments', 'int', '0')
        ->column('CountAllComments', 'int', '0')
        ->column('LastCategoryID', 'int', '0')
        ->column('DateMarkedRead', 'datetime', null)
        ->column('AllowDiscussions', 'tinyint', '1')
        ->column('Archived', 'tinyint(1)', '0')
        ->column('CanDelete', 'tinyint', '1')
        ->column('Name', 'varchar(255)')
        ->column('UrlCode', 'varchar(255)', true)
        ->column('Description', 'varchar(500)', true)
        ->column('Sort', 'int', true)
        ->column('CssClass', 'varchar(50)', true)
        ->column('Photo', 'varchar(255)', true)
        ->column('BannerImage', 'varchar(255)', true)
        ->column('PermissionCategoryID', 'int', '-1')// default to root.
        ->column('PointsCategoryID', 'int', '0')// default to global.
        ->column('HideAllDiscussions', 'tinyint(1)', '0')
        ->column('DisplayAs', ['Categories', 'Discussions', 'Flat', 'Heading', 'Default'], 'Discussions')
        ->column('InsertUserID', 'int', false, 'key')
        ->column('UpdateUserID', 'int', true)
        ->column('DateInserted', 'datetime')
        ->column('DateUpdated', 'datetime')
        ->column('LastCommentID', 'int', null)
        ->column('LastDiscussionID', 'int', null)
        ->column('LastDateInserted', 'datetime', null)
        ->column('AllowedDiscussionTypes', 'varchar(255)', null)
        ->column('DefaultDiscussionType', 'varchar(10)', null)
        ->column('Featured', 'tinyint', '0')
        ->column('SortFeatured', 'int', '0', 'index')
        ->set($Explicit, $Drop);
    
    

    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!

  • R_JR_J Ex-Fanboy Munich Admin

    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.

    1. Use phpMyAdmin to change all column types or use sql to do so
    2. Export the database, use a text editor to change everything and reimport
    3. Create a new and blank database, export only the contents from the old db, import that into the new db and point your forum to that new db
    pinchies
  • MrCaspanMrCaspan
    edited July 9

    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

    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` <> '';
    
    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` <> '';
    
    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` <> '';
    
  • R_JR_J Ex-Fanboy Munich Admin

    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

  • R_JR_J Ex-Fanboy Munich Admin

    @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 to false

    Kasparpinchies
Sign In or Register to comment.