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 $assign_to_config['site_url '] setting

August 18, 2011 11:50am

Subscribe [2]
  • #1 / Aug 18, 2011 11:50am

    trif3cta

    148 posts

    We’re having issues getting the site_url to stick on our MSM sites. After digging through EE_Config.php and decoding/deserializing site prefs we were unable to arrive at an answer.

    We’d like for $assign_to_config[‘site_url ‘] to take precedence over the database value, just as $config[‘site_url’] does. We alter the value based on the HTTP_HOST so we can work locally, push to staging, and on to production.

    Currently we have to log in to the staging server and manually change Admin > General Configuration > URL to the root directory of your site every time we release.

    Can you confirm that this is the desired behavior or are we missing something? If $assign_to_config[‘site_url’] isn’t respected, where/how does it actually get used?

    Thanks!


    v2.2.1 - Build: date 20110705

  • #2 / Aug 19, 2011 2:37am

    John Henry Donovan

    12339 posts

    trif3cta,

    Is this a fresh install?
    Are you using the new admin.php file?
    What version and build of MSM are you using?

    In your second sites admin.php if you hardcode the new domain and leave out the HTTP_HOST can I confirm that works for you when pushed to staging.

    $assign_to_config['cp_url'] = 'http://domain2.com/admin.php';
  • #3 / Aug 19, 2011 3:11pm

    trif3cta

    148 posts

    Thanks for the reply John.

    It’s a fresh install, not an upgrade. Multiple Site Manager Version: 2.1.0 Build: 20110622

    The cp_url works fine, it’s site_url that’s giving us the issue.


    admin.php has site_name and cp_url defined

    index.php has site_name, cp_url, and site_url

    No matter what we enter as site_url, the site uses what’s stored in the DB (even when we try to delete it).

  • #4 / Aug 22, 2011 7:11pm

    Lisa Wess

    20502 posts

    Hi, trif3cta -

    I believe what you’re seeing is expected behavior; there is a feature request to amend this in the future, which you might add your voice to.

  • #5 / Aug 23, 2011 4:02pm

    trif3cta

    148 posts

    Thanks for the reply.

    Ouch! That means every time we move our 20 sites to staging and then on to production server, we need to login and edit one field for each site. Either that or decode and deserialize the value and run a MySQL update in a script. :(

    I’ll add my 2 cents to that thread. I appreciate your time.

  • #6 / Aug 23, 2011 4:42pm

    Lisa Wess

    20502 posts

    It is definitely a good feature request, for exactly the reasons you outlined.  Another option would be to use a global variable or snippet and then do a find and replace on that value - but very carefully. =)

    If you do have any other questions come up, please let us know. Thanks!

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

ExpressionEngine News!

#eecms, #events, #releases