Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

"Bonk!" Message after updating to the latest version of Garden/Vanilla 2

edited February 2010 in Vanilla 2.0 - 2.8
I just tried to upgrade my Van 2 installation (the last update was right after you released the updated search); Now I get "Bonk". Is there a place to find out exactly what is going wrong. I'm replacing every file except the config.php and my theme.
«1

Comments

  • MarkMark Vanilla Staff
    First, add this to your conf/config.php file so you can see the actual error message:

    $Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php';

    I bet it has something to do with database changes we've made. Implementing the changes is easy. Sign into your forum with your admin user (whoever has UserID 1), and then navigate to:
    http://yourdomain.com/utility/structure/garden
    http://yourdomain.com/utility/structure/vanilla
    http://yourdomain.com/utility/structure/conversations
    The Utility controller has a "structure" method that allows admins to update the database with the latest changes. When you go to these pages, you will see all changes it will execute on the database (if there are any), and a link at the bottom to execute them.

    We're going to make this process more streamlined down the road - but you get the idea.

    Oh, and back up your database first!
  • Mark, I can't get far enough to log in as any one. I do now see that it is a column:

    Table GDN_Category: Column UrlCode

    What is the type of column that this is? I can then just go in and manually modify it.
  • edited February 2010
    Ok; I found in the code that it was a VarChar,

    Now I'm getting:

    Base directory /home/ben/forum.wbpsystems.com/html/cache/HtmlPurifier does not exist, please create or change using %Cache.SerializerPath
    The error occurred on or near: /home/ben/forum.wbpsystems.com/html/library/vendors/htmlpurifier/class.htmlpurifier.php
    11112: $base = $this->generateBaseDirectoryPath($config);
    11113: if (!is_dir($base)) {
    11114: trigger_error('Base directory '.$base.' does not exist,
    11115: please create or change using %Cache.SerializerPath',
    11116: E_USER_WARNING);
    11117: return false;
    11118: } elseif (!$this->_testPermissions($base)) {
    11119: return false;
    11120: }

    Cache is empty (or at least it is until this error happens, then it sticks three files there)
  • MarkMark Vanilla Staff
    You can get to the entry page by going to:

    http://yourdomain.com/entry

    Sign in with your admin account, and it will probably put you to the forum (and the error again).

    Then go to this structure url:

    http://yourdomain.com/utility/structure/vanilla

    And run the query to update your table.
  • MarkMark Vanilla Staff
    edited February 2010
    Ohhh. You need to rebuild your htmlpurifier cache folder structure, too. Try adding a "HtmlPurifier" folder to your cache folder.

  • Could you expand on that?
  • Ok, adding the HtmlPurifier to cache doesn't do anything, disabling HtmlPurifier fixes it, but isn't that dangerous?
  • MarkMark Vanilla Staff
    No, not dangerous. It just means that html won't be rendered at all (it will fall back to the text formatter). Try re-enabling it with the plugin screen?

    Also, did you get that column added using the structures?
  • MarkMark Vanilla Staff
    The UrlCode is a field we added so that categories could be identified by a unique string in the url rather than a number. You'll need to edit each of your categories to give them unique url codes. If you click on any of the categories in our list here at the top-right of the page, you'll see what I mean. For example, "Features & Feedback" is saved as "feedback" in the url code field. Which means that you can access that category by going to vanillaforums.org/categories/feedback
  • MarkMark Vanilla Staff
    fyi - I changed your discussion topic so more people could find it helpful as the run into these problems...
  • edited February 2010
    I added UrlCode manually; which got the app loaded far enough to be able to log in. Then I ran the structures for the other changes.

    Disabling and enabling the plug-in through the interface still causes the failure (I have filled in the UrlCode for each category) -- Though given it just doesn't allow HTML and it doesn't matter nearly as much to me (I thought it would allow people injecting script tags).
  • MarkMark Vanilla Staff
    edited February 2010
    It's really just that html purifier is failing to create it's own cache files. Most likely a permission thing on your server. With Garden we typically set up HtmlPurifier's cache folders for you during your initial install - which is why you never had the problem before your update.

    I bet if you chowned the cache/HtmlPurifier folder to your apache user it would work.
  • tried to update also today to most recent v2 from github, having errors. HtmlPurifier exists
    Unknown column 'c.UrlCode' in 'field list'
    select distinct c.CategoryID as `CategoryID`, c.Description as `Description`, c.CountDiscussions as `CountDiscussions`, c.UrlCode as `UrlCode`, concat_ws(' → ', p.Name, c.Name) as `Name` from GDN_Category c left join GDN_Category p on c.ParentCategoryID = p.CategoryID inner join GDN_Permission _p on _p.JunctionID = c.CategoryID inner join GDN_UserRole _ur on _p.RoleID = _ur.RoleID where c.AllowDiscussions = :cAllowDiscussions and (_ur.UserID = :_urUserID and (_p.`Vanilla.Discussions.View` = :_pVanillaDiscussionsView)) order by c.Sort asc


    /html/v4/library/database/class.database.php

    if (!is_object($PDOStatement)) {

    222: trigger_error(ErrorMessage('PDO Statement failed to prepare', $this->ClassName, 'Query', $this->GetPDOErrorMessage($this->Connection()->errorInfo())), E_USER_ERROR);

    223: } else if ($PDOStatement->execute($InputParameters) === FALSE) {

    224: trigger_error(ErrorMessage($this->GetPDOErrorMessage($PDOStatement->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);

    225: }

    226: } else {

    227: $PDOStatement = $this->Connection()->query($Sql);

    228: }


  • MarkMark Vanilla Staff
    @bobtheman - You need to update your database because we added a field to the category table. Sign in with your admin account, then go to this structure url:

    http://yourdomain.com/utility/structure/vanilla

    And run the query to update your table. After that, you'll need to add a urlcode for each of your categories. The UrlCode is a field we added so that categories could be identified by a unique string in the url rather than a number. You'll need to edit each of your categories to give them unique url codes. If you click on any of the categories in our list here at the top-right of the page, you'll see what I mean. For example, "Features & Feedback" is saved as "feedback" in the url code field. Which means that you can access that category by going to vanillaforums.org/categories/feedback
  • bobthemanbobtheman
    edited February 2010
    @Mark
    sorry, i should of mentioned that i i cant log in, i cant get to that page, and i tried to visit the /utility/structure/vanilla and it doesnt work. I get this

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, support@supportwebsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    I cant log into the ACP of the vanilla installation. I have the HtmlPurifier in my cache dir

    any other ideas ?

  • MarkMark Vanilla Staff
    @bobtheman - try turning off url rewriting in Garden & do it again. You can turn it off by editing conf/config.php and adding this line:

    $Configuration['Garden']['RewriteUrls'] = FALSE;
  • @Mark
    Still same error msg, nothing different, any other ideas?
  • Try deleting the .htaccess file all together?
  • @garymardell
    thanks, no luck though :( same error msgs
  • Then you either have another htaccess file floating around in a higher directory. Or you need to contact your host. As i'm pretty sure that only something like a htaccess file or other (usually inaccessible files) can cause an internal server error.
Sign In or Register to comment.