The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Moving site from within a subfolder
I built my site in a subfolder (e.g. www.something.com/community) and now I am ready to move it into production (e.g. www.something.com). I copied all of the files and updated the two values in the admin settings that referenced my old to the new url. My problem is that my CSS and Javascipt files are still referencing the old URL.
Any ideas? |
#2
|
|||
|
|||
I think the paths for those should be relative. What do you have under "Site Name / URL / Contact Details" for Forum URL and Always use Forum URL as Base Path?
|
#3
|
|||
|
|||
The forum URL is http://www.somthing.com (which is correct)
Always use Forum URL as Base Path is set to YES |
#4
|
|||
|
|||
Hmm...OK, when you view the html source for a page, is the <base> tag correct?
|
#5
|
|||
|
|||
No it is not.
|
#6
|
|||
|
|||
Well, I don't know then. There's this function (in class_core.php) to determine the path for the <base> tag:
Code:
function fetch_basepath($rel_modifier = false) { if ($this->registry->basepath != '') { return $this->registry->basepath; } if ($this->registry->options['bburl_basepath']) { $basepath = trim($this->registry->options['bburl'], '/\\') . '/'; } else { $basepath = VB_URL_BASE_PATH; } return $basepath = $basepath . ($rel_modifier ? $this->xss_clean($rel_modifier) : ''); } so I believe if you have "Always use Forum URL as Base Path" set to Yes then it should use the Forum URL set in the option above that. Did you change databases when you moved up a level? Do you have any sort of chaching going on? |
#7
|
|||
|
|||
Ok so now I am stumped. I modified this function to return my correct url (www.something.com) and it worked. Now the site displays and functions properly. But obviously this is not the correct answer. I did trace the problem back to $this->registry->options['bburl'] returning the incorrect url. I assume that this is pulling the value directly out of the vb_settings table for the field bburl. But this has the correct value which is not being returned by this function.
Any ideas? |
#8
|
|||
|
|||
The settings are cached in the datastore db table, but that should be rebuilt whenever you edit any setting. Maybe something's going wrong with that.
Oh...I think it's possible to set caching to use other than the db, like files. I suppose it's possible that you have it set to use the file system and the cache files don't have the correct permissions. |
#9
|
|||
|
|||
That was the problem. I wrote a script to update the fields in the cache and it worked. You'd think there would be a magic button somewhere to refresh the cache?
Jon |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|