Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2011, 09:08 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Style Chooser Shows Up On One Server But NOT The Other??

*** PROBLEM SOLVED IN POST#11 ***

Ok this the most bizarre thing I have seen in awhile so I had to post up and ask on this one.

My style chooser at the bottom of my forum will work when I have my forum/database hosted on my local server here at home. However when I take the EXACT SAME FORUM (complete database dump and all forum directory files) and move it over to my dedicated server online the Style Chooser stops working It's the most bizarre thing ever and I can't figure out WHY it does it. The ONLY file that I have to change is my config.php because obviously there are a few settings that are different.

Can anyone think of ANYTHING that would cause this? This happens with the DEFAULT style and my CUSTOM style. They both do the exact same thing when moved from server to server. Any ideas?
Reply With Quote
  #2  
Old 01-10-2011, 02:56 PM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you moved it did you recheck those settings in the vb admincp? maybe they were disabled and need to be re-enabled.
Reply With Quote
  #3  
Old 01-11-2011, 01:43 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope I used the EXACT SAME database dump from one server to another as well as the EXACT SAME file system dump as well. The ONLY file that is different is the config.php file but I seriously can't find ANYTHING in that file that would cause this.
Reply With Quote
  #4  
Old 01-11-2011, 01:56 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe try going to "Maintenance->Update Counters" and rebuild styles, maybe the problem is that the cache isn't there.
Reply With Quote
  #5  
Old 01-11-2011, 02:37 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still nothing :erm:

Gotta be one of the most bizarre things I have seen in awhile that's for sure. I've been in awe all day lol
Reply With Quote
  #6  
Old 01-11-2011, 03:48 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you move the board to a new domain or a different domain from the original domain it was installed on? If so you will need to change your URL settings in the admincp. Not sure if that would solve it or not though.
Reply With Quote
  #7  
Old 01-11-2011, 05:23 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope same domain just different servers.

I have tried...
- Rebuilding the styles
- Tried with the Default Style and even made sure that all templates were reverted to stock
- Importing a new style
- Cruised thru the entire config.php file and checked everything
- Enabled/Disabled AdminCP -> vB Options -> Store CSS Stylesheets as Files?
- Disabled all plugins via the config.php file

I dunno what the deal is but it just will NOT work on the hosted server. Everything works just fine on the local server. I haven't found any other features that aren't functioning properly either just the damn Style Chooser lol. I could understand if this was a custom skin issue but even the Default Skin is doing the same thing.
Reply With Quote
  #8  
Old 01-11-2011, 06:07 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In global.php there's this code:

PHP Code:
// #############################################################################
// Generate Style Chooser Dropdown
if ($vbulletin->options['allowchangestyles'] AND empty($_POST['do']))
{
    
$stylecount 0;
    
$quickchooserbits construct_style_options(-1'--'truetrue);
    
$show['quickchooser'] = ($stylecount true false);
    unset(
$stylecount);
}
else
{
    
$show['quickchooser'] = false;


So you could temporarily change that first line like this:

PHP Code:
// if ($vbulletin->options['allowchangestyles'] AND empty($_POST['do']))
if (true
and see if anything shows up (that line starting with 'if' shold really be all on one line but the CODE tag seems to be wrapping it).

Then if that doesn't change anything try this:

PHP Code:
//    $show['quickchooser'] = ($stylecount > 1 ? true : false);
    
$show['quickchooser'] = true
anyway, you probably get the idea.
Reply With Quote
  #9  
Old 01-11-2011, 06:38 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok so when I tried the first suggestion you made commenting out the line and adding the if (true) it didn't work.

Then I tried changing
$show['quickchooser'] = false; -> $show['quickchooser'] = true;

PHP Code:
// Generate Style Chooser Dropdown
//if ($vbulletin->options['allowchangestyles'] AND empty($_POST['do']))
//{
//    $stylecount = 0;
//    $quickchooserbits = construct_style_options(-1, '--', true, true);
//    $show['quickchooser'] = ($stylecount > 1 ? true : false);
//    unset($stylecount);

//}
//else
{
  
$show['quickchooser'] = true;    

Which FINALLY got the dropdown box to show up but unfortunately no styles


I also tried changing $stylecount = 0; -> $stylecount = 3;

PHP Code:
// Generate Style Chooser Dropdown
if ($vbulletin->options['allowchangestyles'] AND empty($_POST['do']))

{
    
$stylecount 3;
    
$quickchooserbits construct_style_options(-1'--'truetrue);
    
$show['quickchooser'] = ($stylecount true false);
    unset(
$stylecount);



Which did the same thing as above where it displayed a style chooser box with nothing in it.

Any other ideas? Sounds like we are on the right track now even though this seems completely retarded having to FORCE ENABLE this when it's working perfectly fine on the local server I don't really care as long as I can get it working again.

I wonder if it could be a server side issue? Like maybe the host's version of MySQL or PHP is causing the issue. I don't see how in the hell that this is the ONLY THING that isn't working properly. I would think that I would be having issues somewhere else as well but nothing.
Reply With Quote
  #10  
Old 01-11-2011, 07:17 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, the idea isn't to try to force it to work, we just want to figure out why it's not working. I think we've figured out that it's something in the function construct_style_options that isn't working right.

So now I'd say put the global.php code back to the original and go to includes/functions.php and find construct_style_options, and try to figure out why that isn't working (because it not only figures out what goes in the dropdown, it also sets $stylecount). There's this part:

PHP Code:
    // check to see that the current styleid exists
    // and workaround a very very odd bug (#2079)
    
if (is_array($vbulletin->stylecache["$styleid"]))
    {
        
$cache =& $vbulletin->stylecache["$styleid"];
    }
    else if (
is_array($vbulletin->stylecache[$styleid]))
    {
        
$cache =& $vbulletin->stylecache[$styleid];
    }
    else
    {
        return;
    } 
which could return nothing, that's what made me think that it might be the style cache. There's also the possibility that one of the foreach loops under that isn't executing. So I guess either way, there's probably something wrong with $vbulletin->stylecache. (ETA: it's actually a little more complicated than that since the function calls itself to build the lower levels of the style "tree").

Unfortuantely it'll probably be harder to understand why it's failing than to narrow down which line of code is responsible. I don't understand the format of the stylecache - I would have guessed that it was just an array of styles, but looking at this code, that doesn't make sense.
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:54 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.04084 seconds
  • Memory Usage 2,267KB
  • 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
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete