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

My forum is down 2.1?

2

Comments

  • DanDevineDanDevine
    edited April 2020

    I also got this error at the end of doing the upgrade:


  • R_JR_J Ex-Fanboy Munich Admin

    See if there is still a file "class.settingscontroller.php" in "/applications/vanilla/controller". Deleting it was one of the steps in the upgrade procedure. After that you should delete everything in /cache.


    I do not understand all of those error messages in the screenshot above. That defined*.test file isn't needed, but you should re-upload all files again and again until that succeeds.

  • Thanks!

    I must have missed that deletion on my list. Great! Seems to be working just have to get used to the changes. I have a lot of plugins remaining from the previous 2.1 version. Is there a list somewhere as to what is should be removed (unsupported) and what should remain? I really appreciate all you guys have done!

  • DanDevineDanDevine
    edited April 2020

    I removed a bunch of really old plugins. One thing I need for the users is some sort of fileupload. I did some searching and it appears this is now in the core. How do people attach files such as pdf. graphics, text files, etc to a post? I can't seem to get advanced editor or config advanced editor to activate. Complains about media model problem. Do you have a link to any other changes I need to know (if I can understand them) about things the are now handled without plugins? As you can see this stuff is not my forte!

  • R_JR_J Ex-Fanboy Munich Admin

    You can either use the advanced editor or the rich editor. I recommend the advanced editor. It is not so "fancy" like the rich editor but it is solid and stable.

    There have been others with problems with the MediaModel in the past. You might find your answer when searching the forum. I think there is one column which needs to be removed from GDN_Media, but I really do not remember more about that.

  • I have advanced editor working now. Not sure how. But have that and the config advanced editor working. Will either of the two of them display the uploaded text file inline? Same with a graphic. I think the old fileupload plugin did this.

    Thanks,

    Still deleting old plugins and finding replacements.

    Dan

  • DanDevineDanDevine
    edited April 2020

    Tried a test post and it failed with:


    { "Code": 256, "Exception": "Unknown column 'LastCategoryID' in 'field list'", "Class": "Gdn_ErrorException" }


    I am seeing the tests that I did on the discussion page. They are there but I still get the error above. Also I cannot delete them. I get the same error. I have since found that if I delete them and get the error message but refresh the page they are deleted. I have all the plug-ins disabled except the maintenance plug-in because I can't see to find the maintenance switch in the core. Where is that located in the core?


    When I did the upgrade the forum loaded immediately without utility/update. I tried running it to see if it solves this error but it will not run and returns the 500 internal server error.


    He is a portion of the php.log:

    [22-Apr-2020 23:13:59 UTC] PHP Warning: dateTimeToTimeStampcalled with bad input in /home/devinephoto/berksbassmasters.com/vanilla-2/library/Vanilla/Formatting/DateTimeFormatter.php on line 228

    [22-Apr-2020 23:28:16 UTC] PHP Warning: The theme in /themes/mobile.not sure has an invalid key: mobile.not sure. in /home/devinephoto/berksbassmasters.com/vanilla-2/library/Vanilla/AddonManager.php on line 401

    [22-Apr-2020 23:33:30 UTC] PHP Warning: dateTimeToTimeStampcalled with bad input in /home/devinephoto/berksbassmasters.com/vanilla-2/library/Vanilla/Formatting/DateTimeFormatter.php on line 228

    [22-Apr-2020 23:33:55 UTC] PHP Warning: dateTimeToTimeStampcalled with bad input in /home/devinephoto/berksbassmasters.com/vanilla-2/library/Vanilla/Formatting/DateTimeFormatter.php on line 228

    [22-Apr-2020 23:34:27 UTC] PHP Warning: The addon in /plugins/googlesignin is invalid. Duplicate addon: googlesignin in /home/devinephoto/berksbassmasters.com/vanilla-2/library/Vanilla/AddonManager.php on line 363

    Don't know if any of this helps.


    Dan

  • R_JR_J Ex-Fanboy Munich Admin

    Look at that discussion: https://open.vanillaforums.com/discussion/38086/upgrading-from-2-0-18b1-to-3-3#latest

    I think you need to proceed the same. Find out where the column LastCategoryID is missing and create it manually.

  • Ok,

    So I would look it all or one of these locations?

    You can take a look at the files:

    /applications/dashboard/settings/structure.php

    /applications/vanilla/settings/structure.php

    /applications/conversations/settings/structure.php


    and see in which one the text LastCategoryID is missing and then create it as what? Sorry, I am not very good at this. Each one of these should have LastCategoryID in it? Just copy the line from one that has the text and insert in the one of the three where it would be missing?

    Dan

  • DanDevineDanDevine
    edited April 2020

    I am afraid this may be beyond my knowledge without step by step. In any case, will a reinstall of 3.3 over the top of what I have fix anything? The only thing I have found so far is that posts seem to fail with the above error and I get an this error when I try to look at the Inbox:


    Argument 2 passed to Vanilla\Formatting\FormatService::renderExcerpt() must be of the type string, null given, called in /home/devinephoto/berksbassmasters.com/vanilla-2/applications/conversations/views/messages/conversations.php on line 39

    The error occurred on or near: /home/devinephoto/berksbassmasters.com/vanilla-2/library/Vanilla/Formatting/FormatService.php

    59:      * @param string $format The format of the content.
    60:      *
    61:      * @return string
    62:      */
    63:     public function renderExcerpt(string $content, string $format): string {
    64:         return $this
    65:             ->getFormatter($format)
    66:             ->renderExcerpt($content);
    67:     }
    

    Backtrace:

    [/home/devinephoto/berksbassmasters.com/vanilla-2/applications/conversations/views/messages/conversations.php:39] Vanilla\Formatting\FormatService->renderExcerpt();
    [/home/devinephoto/berksbassmasters.com/vanilla-2/applications/conversations/views/messages/all.php:26] PHP::include();
    [/home/devinephoto/berksbassmasters.com/vanilla-2/library/core/class.controller.php:782] PHP::include();
    [/home/devinephoto/berksbassmasters.com/vanilla-2/library/core/class.controller.php:1386] Gdn_Controller->fetchView();
    [/home/devinephoto/berksbassmasters.com/vanilla-2/library/core/class.pluggable.php:217] Gdn_Controller->xRender();
    [/home/devinephoto/berksbassmasters.com/vanilla-2/applications/conversations/controllers/class.messagescontroller.php:278] Gdn_Pluggable->__call();
    [/home/devinephoto/berksbassmasters.com/vanilla-2/applications/conversations/controllers/class.messagescontroller.php:603] MessagesController->all();
    [/home/devinephoto/berksbassmasters.com/vanilla-2/library/core/class.dispatcher.php:872] MessagesController->inbox();
    [/home/devinephoto/berksbassmasters.com/vanilla-2/library/core/class.dispatcher.php:289] Gdn_Dispatcher->dispatchController();
    [/home/devinephoto/berksbassmasters.com/vanilla-2/index.php:29] Gdn_Dispatcher->dispatch();
    


    Thanks,

    Dan

  • R_JR_J Ex-Fanboy Munich Admin

    Okay, one step at a time. If you have some patience, you'll manage that!

    The error message { "Code": 256, "Exception": "Unknown column 'LastCategoryID' in 'field list'", "Class": "Gdn_ErrorException" } looks to me as if there is one column missing in a table. The three files mentioned above hold all the important information about database tables. The one in the /applications/vanilla subfolder holds information which is forum related and "LastCategoryID" sounds forum related (in contrast to user related which would be in dashboard or private message related which would be ins conversations)

    Search that file for LastCategoryID shows the following code:

    $Construct->table('Category');
    $CategoryExists = $Construct->tableExists();
    $CountCategoriesExists = $Construct->columnExists('CountCategories');
    $PermissionCategoryIDExists = $Construct->columnExists('PermissionCategoryID');
    
    $LastDiscussionIDExists = $Construct->columnExists('LastDiscussionID');
    
    $CountAllDiscussionsExists = $Construct->columnExists('CountAllDiscussions');
    $CountAllCommentsExists = $Construct->columnExists('CountAllComments');
    
    $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')
    


    That column "LastCategoryID" should be in the database table GDN_Category and it should be of type int(eger) with "0" as the default value. Your hoster normally gives you a tool like phpMyAdmin at hand with which you can take a look at your database. Please check if this column exists in GDN_Category and create it if not. If you don't know how to add a column, please search for beginner tutorials with phpMyAdmin, but it should be quite easy. If you make a database backup, you don't need to fear to destroy something!

  • R_JR_J Ex-Fanboy Munich Admin

    I admit, that problem with the conversations is cryptic. Could you please check if your table GDN_ConversationMessage has a column called Format and if there are rows where there is no format given? Format normally should be HTML, BBCode, Markdown or something like that.

    If there are rows without a format, how many? (just estimate: "few", "don't know", "oh my gosh!")

  • DanDevineDanDevine
    edited April 2020

    Ok RJ,

    I backed up the database to my local computer. I am into the database on the server and the LastCatagoryID is not there. Now I have to find an FAQ on how to add that line.

    Here is the end of the list when I browse that file.


    Ok, ignore above. I think this is where it needs to be added:


    Am I in the correct view? Is this where I will do the addition when I figure out how to add the column? If so does it matter where it get added? Will I be adding the line "'LastCategoryID" and what else will I need to add to that column? Just int(0)?

  • On the conversations issue there are quite a few with "null". A few with "text" and "html". There are 102 messages with "null" in format. There are 5 with "text" in format and there are 11 with "html". The forum has not been busy and has less that 100 members who have registered and only 35 active members in our club. Most of the null stuff dates back from late 2010 to early 2009. Of course now with all that is going on and we can't have meetings this happens! Now everybody wants to know where the forum is that nobody seem to care about before. Great!

  • R_JR_J Ex-Fanboy Munich Admin

    Here is one link which shows how to add a column: https://www.pair.com/support/kb/adding-a-column-to-a-database-in-phpmyadmin/

    And - unbelievable - there's also a video! https://www.youtube.com/watch?v=jZ72GCGWPQg

    Add the column after "CountAllComments" and also make it int(11)

  • R_JR_J Ex-Fanboy Munich Admin
    UPDATE GDN_ConversationMessage
    SET Format = 'Text'
    WHERE Format is null
    OR Format = ''
    


    Copy the above and run it in with phpMyAdmin.

  • DanDevineDanDevine
    edited April 2020

    Looks ok, but would it be CountComments, I don't seem to have CountAllComments? Also, would the run command be Run SQL query/queries on table.... be the process to do?

  • R_JR_J Ex-Fanboy Munich Admin

    Look at the code above again: this is an excerpt of the columns in the Category table:

    $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')
    

    Maybe you only have to insert LastCategoryID and after that running /utility/structure would fix that also CountAllComments doesn't exist. But it could be that you have to add multiple columns manually

  • Ok, maybe I am confused. i am looking in the SQL database in my GDN_Category. It appears in the second graphic I sent you above. Am I looking in the wrong place for this. It looks nothing like the graphic you sent me above. Sorry for not understanding this but I want to be sure I am in the proper file on the server sql. That is where this edit goes and not in the files in my Vanilla-2 directory on my server. I am looking in the edit of the sql database at the moment.

  • DanDevineDanDevine
    edited April 2020

    I found this is Appliatiions/Vanilla/Settings/Structure.php:


    So is this suppose to be in all three of the files?

    /applications/dashboard/settings/structure.php

    /applications/vanilla/settings/structure.php

    /applications/conversations/settings/structure.php

    I was in the actual sql database earlier and made a local backup of it. I thought I needed to add a column there? That is why I am confused? Where is the edit suppose to go/

Sign In or Register to comment.