Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2012, 02:44 PM
jellis09 jellis09 is offline
 
Join Date: Dec 2011
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 02-03-2012, 03:16 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #3  
Old 02-03-2012, 03:51 PM
jellis09 jellis09 is offline
 
Join Date: Dec 2011
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The forum URL is http://www.somthing.com (which is correct)
Always use Forum URL as Base Path is set to YES
Reply With Quote
  #4  
Old 02-03-2012, 03:52 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm...OK, when you view the html source for a page, is the <base> tag correct?
Reply With Quote
  #5  
Old 02-03-2012, 05:16 PM
jellis09 jellis09 is offline
 
Join Date: Dec 2011
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No it is not.
Reply With Quote
  #6  
Old 02-03-2012, 07:43 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 02-06-2012, 01:54 PM
jellis09 jellis09 is offline
 
Join Date: Dec 2011
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 02-06-2012, 02:14 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 02-07-2012, 01:16 PM
jellis09 jellis09 is offline
 
Join Date: Dec 2011
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06610 seconds
  • Memory Usage 2,232KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete