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.

Unable to change themes in admin dashboard (IIS)

So, I recently installed Vanilla on my IIS 8 server. I verified all the requirements were satisfied (with the exception of Apache) and I was able to perform what appeared to be a successful install. I was able to enter the admin dashboard and start changing settings, and everything appeared to be working at that point. However, as soon as I tried to visit the forum, I received a "Page not found" error. After pulling out my hair for a while, the fix turned out to be simple: enable "Vanilla" in Addons->Applications. Normally, this should be automatically enabled after installation, but for some reason on my IIS installations, it is always disabled. After the fix, I could now view the forums successfully.

Unfortunately, further testing uncovered another problem. While I can change every other setting I've tried in the admin dashboard and config.php gets updated every time, I can not change themes. When I press the Apply button in Appearances -> Themes, it simply does nothing. I've verified I can change themes by manually editing the config.php, but I would like to find out why it is not working in the admin dashboard as it makes me suspicious there may be other problems lingering that I don't know about.

Does anyone have any insight?


  • Options

    Also, to add a little bit more information that might be helpful, the config.php does get touched and the comment at the bottom gets its time stamp updated every time I try to apply a theme, but the file does not actually get modified other than the comment.

    There are no errors apparent on the admin dashboard. It just silently fails.

    In addition, I noticed something else different between my installs on IIS and on Apache.

    After a fresh installation on IIS, the config.php file is missing the following entries which appear in the config.php of a fresh install on Apache:

    // Conversations
    $Configuration['Conversations']['Version'] = '';
    $Configuration['EnabledApplications']['Vanilla'] = 'vanilla';
    $Configuration['Garden']['InstallationID'] = 'XXXX-XXXXXXXX-XXXXXXXX';
    $Configuration['Garden']['Theme'] = 'default';
    $Configuration['Modules']['Vanilla']['Content'] = 'a:6:{i:0;s:13:"MessageModule";i:1;s:7:"Notices";i:2;s:21:"NewConversationModule";i:3;s:19:"NewDiscussionModule";i:4;s:7:"Content";i:5;s:3:"Ads";}';
    // Routes
    $Configuration['Routes']['DefaultController'] = 'discussions';
    // Vanilla
    $Configuration['Vanilla']['Version'] = '';
  • Options

    It looks lime Vanilla cannot write to the middle of the file, but can write to the end of the file (append)

    Check those functions & save the code, because it's interesting, even though it's IIS

    There was an error rendering this rich post.

  • Options
    kzoinkkzoink New
    edited July 2013

    That's a good observation and I will look into that.

    By the way, I did some investigating earlier and noticed that if I change line 74 of class.setupcontroller.php like so:

    $AppNames = C('Garden.Install.Applications', array('Conversations', 'Vanilla'));

    $AppNames = C('Garden.Install.Applications', array('Vanilla', 'Conversations'));

    What happens is the Vanilla addon gets enabled successfully in config.php but Conversations does not! It was the other way around previously, with the original code. So it would appear that the second iteration of the foreach on line 77 is failing, for whatever reason.

    This foreach happens to be wrapped in a try/catch block. I've verified that no exceptions are being thrown, either, so the catch block is never reached. In fact, nearing the end of the function, $this->Form->ErrorCount is zero and the redirect to the dashboard--Redirect('settings/gettingstarted')--is successfully executed.

  • Options

    Hmm, now that I think of it, writing to the middle of the file does work, as I can change other options in the admin dashboard which are updated in config.php just fine.

    I think there is a deeper issue here.

Sign In or Register to comment.