1 of 2
1
Lingering Site URL variables in browser status bar
Posted: 03 July 2008 03:06 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  178
Joined  12-13-2007

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.

Any ideas?

 Signature 

Fusionary | Geniuscar

Profile
 
 
Posted: 03 July 2008 04:44 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12390
Joined  04-29-2002

I suspect it has to do with something in the exp_sites table. But those values are in serialized arrays, you shouldn’t manipulate then directly.

You could view that row inside of EE or PHPMyAdmin to see if you find the first site.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 07 July 2008 07:01 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  178
Joined  12-13-2007

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.

 Signature 

Fusionary | Geniuscar

Profile
 
 
Posted: 07 July 2008 07:41 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23523
Joined  05-20-2002

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?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 07 July 2008 08:10 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  178
Joined  12-13-2007

Tried that, still just can’t seem to shake that old site_name from the DB

 Signature 

Fusionary | Geniuscar

Profile
 
 
Posted: 07 July 2008 08:24 AM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23523
Joined  05-20-2002

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.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 07 July 2008 08:48 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  178
Joined  12-13-2007

Only one that looks wrong:
[site_name] => Site 1 Name

In the template under that, I tried {site_name}, and it outputs correctly “Site 2 Name”

 Signature 

Fusionary | Geniuscar

Profile
 
 
Posted: 07 July 2008 09:00 AM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23523
Joined  05-20-2002

What happens if you do:

<?php
global $PREFS;

echo
$PREFS->ini('site_name');

?>

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 07 July 2008 09:05 AM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  178
Joined  12-13-2007

It outputs the correct name, “Site 2 Name”

 Signature 

Fusionary | Geniuscar

Profile
 
 
Posted: 08 July 2008 09:06 AM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23523
Joined  05-20-2002

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.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 08 July 2008 09:12 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  178
Joined  12-13-2007

No, never had MSM with this install :(

 Signature 

Fusionary | Geniuscar

Profile
 
 
Posted: 08 July 2008 09:32 AM   [ Ignore ]   [ # 11 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23523
Joined  05-20-2002

Heh- I give up.  I’ll ask the crew where to edit it.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 08 July 2008 12:00 PM   [ Ignore ]   [ # 12 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32861
Joined  05-14-2004

Can you post your path.php please? You can edit out the system directory, but leave the rest.

 Signature 
Profile
MSG
 
 
Posted: 08 July 2008 12:26 PM   [ Ignore ]   [ # 13 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  178
Joined  12-13-2007

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

?>

 Signature 

Fusionary | Geniuscar

Profile
 
 
Posted: 08 July 2008 12:34 PM   [ Ignore ]   [ # 14 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32861
Joined  05-14-2004

Can you try blanking that out so that it pulls it from your General Config out of the database instead?

 Signature 
Profile
MSG
 
 
Posted: 08 July 2008 12:56 PM   [ Ignore ]   [ # 15 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  178
Joined  12-13-2007

I blanked it out, no change.

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.

 Signature 

Fusionary | Geniuscar

Profile
 
 
Posted: 08 July 2008 01:06 PM   [ Ignore ]   [ # 16 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32861
Joined  05-14-2004

Yes, those are for the MSM for Additional Sites; they don’t need to concern you though.  Is that what you are worried about?

 Signature 
Profile
MSG
 
 
Posted: 08 July 2008 01:12 PM   [ Ignore ]   [ # 17 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  178
Joined  12-13-2007

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.

 Signature 

Fusionary | Geniuscar

Profile
 
 
Posted: 08 July 2008 01:58 PM   [ Ignore ]   [ # 18 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32861
Joined  05-14-2004

Hi, Tim—

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.

Just ignore them. =)

 Signature 
Profile
MSG
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64933 Total Logged-in Users: 55
Total Topics: 81900 Total Anonymous Users: 27
Total Replies: 440271 Total Guests: 258
Total Posts: 522171    
Members ( View Memberlist )
Newest Members:  Kathryn DaviesPetrovichusharurblaisdellLevagstudioigotthelemonmileswkakiharaAurels