vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Moving site from within a subfolder (https://vborg.vbsupport.ru/showthread.php?t=277987)

jellis09 02-03-2012 02:44 PM

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?

kh99 02-03-2012 03:16 PM

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?

jellis09 02-03-2012 03:51 PM

The forum URL is http://www.somthing.com (which is correct)
Always use Forum URL as Base Path is set to YES

kh99 02-03-2012 03:52 PM

Hmm...OK, when you view the html source for a page, is the <base> tag correct?

jellis09 02-03-2012 05:16 PM

No it is not.

kh99 02-03-2012 07:43 PM

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?

jellis09 02-06-2012 01:54 PM

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?

kh99 02-06-2012 02:14 PM

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.

jellis09 02-07-2012 01:16 PM

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


All times are GMT. The time now is 03:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00962 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete