I’m having a strange problem. I have an EE install, we’ll call it SITE1. I had all the default settings set up for a general EE site set up, so when I had to create SITE2, I just duped it (files and DB).
I’ve noticed when publishing on SITE2, especially noticeable using the ‘quick save’ feature, that in the browser status bar there is a split second where it says “Looking for site1.com…” Between the normal messages of “Connecting to site2.com” , “Transferring from site2.com”, etc.
I’ve checked around in all the settings, and there aren’t references to site1 anywhere.
I’m using config.php variables to override my site_url and several others, I don’t know if thats the culprit. But when I go into the settings from the control panel everything looks right.
Indeed, in the site_system_preferences field, I found several references to the old site including:
* site_name
* captcha_url
* captcha_path
* emoticon_path
I went into the EE admin, and indeed, the emoticon path was never changed from the old site, and once removed, seems to have fixed my problem.
However, the captcha paths were correct in the admin, and seemed to update to the new site in the DB by clicking the Update button on that page (I am setting them in config.php) What I really don’t understand is why the site_name is still there from the old site. In the admin it looks correct, and when I use the site_name variable , it is correct for Site2. But it still says the Site1 name in the DB.
I think to track it down, I’d pull out the overrides in the config.php- then surf the cp and double check all of the settings. Spot anything doing it that way?
OK- let’s see where it is. Create a template- turn php parsing ‘on’- make sure it’s protected because we’re going to print out your config settings. Put:
<pre> <?php global $DB;
$query = $DB->query("SELECT * FROM exp_site");
if ($query->num_rows > 0) { foreach($query->result as $row) { $myprefs = unserialize($row['site_system_preferences']); print_r($myprefs); } } ?>
Untested, but think that will do it. Each value that has the wrong info- paste the key/value pair here.
Hm- ever had MSM installed? Think that’s the site_shortname. Can see it when I edit sites via MSM. Otherwise- I’ll have to call the crew in- I’m having no luck tracking it down further than that.
Sure. The only thing I’ve edited is the $site_url:
<?php
// ------------------------------------------------------ // DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO
// ------------------------------------------------------ // Path to the directory containing your backend files
$system_path = "./XXXXXX/";
// ------------------------------------------------------ // MANUALLY CONFIGURABLE VARIABLES // See user guide for more information // ------------------------------------------------------
$template_group = ""; $template = ""; $site_url = "http://${_SERVER['HTTP_HOST']}/"; $site_index = ""; $site_404 = ""; $global_vars = array(); // This array must be associative
Here’s what I’ve noticed. There seems to be 3 things in exp_sites related to this:
When I change the ‘Name of your site’ field in CP Home › Admin › System Preferences › General Configuration, it seems to update the ‘site_label’ field in the exp_sites table. The site_name field on in exp_sites still says default_site (from the default EE install I believe). Then within the site_system_preferences field there is “s:15:“Site 1 Name”;. Only the site_label ever updates, which is what displays in the EE settings and in a template for the {site_name} var.
Well, I was just trying to figure out how the “s:15:“Site 1 Name”; from the site_system_preferences field ever got set, or how to change it. Definitely never had MSM installed.
Right now its not showing up anywhere, it just worries me having it there since is the the default install setup I use for all my sites.
Those preferences must be there; they are infrastructure elements in case you ever do install the MSM and they will be present on all installations of ExpressionEngine. You would not want to mess with those as you might well break something.