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.

New installation woes

edited May 2011 in Vanilla 2.0 - 2.8
I've got a few things which don't really appear to be working straight off the bat, so I'll just list them here, rather than clogging up the forum with posts for everything:

#1 - What is the config setting to tell Vanilla what the root folder is?

At the moment, if I delete a conversation, Vanilla redirects to vanilla/discussions.

Unfortunately, my Vanilla install is at forum/ so it breaks.

I looked at the docs, honest Guv, but the page was missing: http://vanillaforums.org/docs/configuration-initialconfiguration?Title=Initial+Configuration

#2 - My Category List is only displaying the total number of discussions, but is not displaying the number of discussions per Category, as I've seen on other Vanilla forums. Is something not working as it should?

Cheers,
Dave

Comments

  • @Tim @Todd maybe new bug to squeeze in for 2.0.18.x

    There was an error rendering this rich post.

  • ToddTodd Vanilla Staff
    Please report bugs in the github issue tracker. Seriously. It really helps us to prioritize things and assign them to team members.

    https://github.com/vanillaforums/Garden/issues
  • edited May 2011
    I'm happy to report these items as bugs - if they are bugs.

    Are issues 1 or 2 easy to solve in the meantime?
  • ToddTodd Vanilla Staff
    1. The code is written to figure out what folder you are in. You may have a problem with htaccess, I'm not sure, but look for that file and there is a bit of help in the comments of that file to support some webhosts that have strange htaccess rules.

    2. I think what you are asking about is a theme issue, but it may be an import issue. Are you saying it's only showing one count of discussions or what?
  • @dave_stewart what's the URL of your site? (if you're ready to show us)
    @Todd I know, but I don't know if it's a bug yet. As soon as bugs are definately bugs I'll be happy to report them in the proper place.
    As long as we don't know whether it's a bug or not, what should we do then? (time for a split / discussion)

    There was an error rendering this rich post.

  • Weirdly, my htacess was blank, so I downloaded it again.

    This is how it looks now, but it still redirects to /vanilla

    # Modified
    # If you modify this file then change the above line to: # Modified

    RewriteEngine On
    # Certain hosts may require the following line.
    # If vanilla is in a subfolder then you need to specify it after the /.
    # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
    RewriteBase /forum
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
  • Here's a link to the forum, so you can see the category list not working: http://www.xjsfl.com/forum/index.php?p=/discussions
  • Also - are pretty URLs not enabled by default? Is there (again) a configuration option for this?
  • TimTim Vanilla Staff
    It tries to detect if URL rewriting will work for your system during install. If you didn't copy your .htaccess, it obviously wouldn't have worked.

    $Configuration['Garden']['RewriteUrls'] = TRUE;

    Should already be in your config, but set to FALSE. Change it to TRUE.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • edited May 2011
    Excellent, that worked great.

    I find that new installations, and new users especially, are great for finding cases when things don't work as expected.

    A few other things I've found during getting my own forum up and running have been:

    1 - Bonk page, due to wrong password configuration in config
    2 - HeadModule not found error, due to local cache-files replacing server cache files

    Might I suggest an improvement for Vanilla with regards to local and server differences?

    1 - If the cache files were instead stored in a subfolder per server configuration, this would stop weird caching errors where for example local files overwrote server files.

    2 - If a further set of (optional) config files were stored per server configuration, these could be edited, then loaded last (if found) to overwrite a few select config settings, such as database usernames and passwords, file locations, etc.
    /vanilla
    /cache
    /www.xjsfl.com
    controller_map.ini
    etc...

    /www.xjsfl.local
    controller_map.ini
    etc...

    /conf
    config-defaults.php
    config.php
    constants.php
    locale.php

    /www.xjsfl.com
    config.php
    etc...

    /www.xjsfl.local
    config.php
    etc...
    Cheers,
    Dave
  • By the way - clearing the cache folder appeared to sort out the issue with the number of discussions not displaying. Although I don't know Vanilla well enough to say for sure - it might be coincidental.
  • edited May 2011
    Well, I thought this this was a case of editing the bootsrap file, but after I had a few problems with the Twitter sign-in plugin, I revisited the issue and realised that I could add a couple of files, as the bootstrap runs a bootstrap.before.php and a bootstrap.after.php file.

    So I wanted to load an additional config file per server, so I added a new folder in conf/ called server/ then two files named after the $_SERVER['hostname'] for my local and remote configurations:
    /conf
    /server
    www.xjsfl.com.php
    www.xjsfl.local.php
    In each of the files I added the server-specific database login details.

    Then, I added the file conf/bootstrap.after.php, and in it, the following code:
    $Gdn_Config = Gdn::Factory(Gdn::AliasConfig);
    $Gdn_Config->Load(PATH_CONF.DS.'server'.DS.$_SERVER['HTTP_HOST'].'.php', 'Use');
    For caching, I added a subfolders in cache/ for each of my server locations:
    /cache
    /www.xjsfl.com
    /www.xjsfl.local
    Then, I added the file conf/bootstrap.before.php, and in it, the following code:
    if(!defined('PATH_CACHE')) define('PATH_CACHE', PATH_ROOT.DS.'cache'.DS.$_SERVER['HTTP_HOST']);
    It's all running pretty well now, and no issues with data being overwritten between locations.
Sign In or Register to comment.