ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

MSM Config help

November 02, 2012 10:15am

Subscribe [1]
  • #1 / Nov 02, 2012 10:15am

    colepublishing

    2 posts

    I have yet to find a sure fire way to figure out the MSM config.

    First, here’s how we have our sites setup (8 sites on MSM).

    Our sites our setup on our server as follows:

    domain1 (main install):
     - system
     - index.php
     - admin.php
     
    domain2:
     - index.php
     - admin.php
    
    domain3:
     - index.php
     - admin.php
    
    etc…

    In our config folder, we have our typical config.php and a site.php. The site.php file has some custom config stuff for ads and what not.

    We are in the process of a large overhaul of the sites, still using EE, but we need to make the config work better.

    We want to have override some things in the config. Namely this isn’t working for us: tmpl_file_basepath.

    I tried to follow this: http://ellislab.com/forums/viewthread/222671/#1024091

    But, couldn’t seem to get it to override following his instructions. We’d like to make it so the configs are not in the database, so we don’t run into issues while working on our local development copies of the sites.

    If someone could shed some light on how MSM config can be used correctly with overrides, that would be great.

    Thanks,
    Erik

  • #2 / Nov 05, 2012 4:04pm

    Dan Decker

    7338 posts

    Hi Erik,

    Welcome to the Forums and thanks for posting your questions!

    Allow me to quote myself:

    How does this impact MSM?
    1) Any site-specific overrides should be set in that site’s index.php using the $assign_to_config array.
    2) Any site-specific Control Panel related overrides should be set in that site’s admin.php $assign_to_config array.
    3) Any installation-wide overrides should be set in /system/expressionengine/config/config.php with the $config array.

    So, for your particular example, you would want to set:

    $assign_to_config['tmpl_file_basepath'] = 'path/to/sites/templates';

    In both a site’s admin.php and index.php and make sure that there *is not* a value for $config[‘tmpl_file_basepath’] set in /system/expressionengine/config/config.php

    Give that a whirl and let me know what shakes out.

    Cheers,

     

  • #3 / Nov 05, 2012 4:14pm

    colepublishing

    2 posts

    Hmmm, I saw the post where you had given the order of how config works.

    I tried that, and did not work… I did find a solution, though seems clunky, it worked for some reason.

    Here’s what I did.

    In the main config.php file:

    switch ($_SERVER['SERVER_NAME'])
    {
            //  main install, default is everything else
            case "www.domain1.com":
            case "domain1.com":
            case "domain1.dev":
     case "www.domain1.dev":
      $config['tmpl_file_basepath']   = $_SERVER['DOCUMENT_ROOT'] . '/system/expressionengine/templates';
      break;
     default:
      $config['tmpl_file_basepath']   = $_SERVER['DOCUMENT_ROOT'] . '/templates';
    }

    The main installs location is the only different location, so this worked.

    I can’t figure out why it doesn’t want to override in the index.php/admin.php using $assign_to_config.

    If I ever figure out why it won’t allow me to do that, I’ll post about it.

    Erik

  • #4 / Nov 06, 2012 3:20pm

    Dan Decker

    7338 posts

    Hi Erik,

    Are you using a bootstrap config like the Focus Lab Master Config?

    That changes quite a few things with MSM.

    I do appreciate the followup and let me know if anything dawns on you in the meantime!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases