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 07-13-2014, 03:30 PM
ae3799t ae3799t is offline
 
Join Date: Nov 2012
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default VB has Broken Links for .JS files

I sent an email to support, but since I do not think they are programmers, I am not sure they can help. Maybe someone here can.

We have been using VB4 for quite some time and from the beginning, we were getting broken link notifications in Google Webmaster tools for the following:

http://www.mydomain.com/treeview/tre...E%3C/script%3E

http://www.mydomain.com/animation/an...E%3C/script%3E

I did not want to use our domain to avoid more 404s from google when they read this forum, but it does not mater since the links are built incorrectly. They should be

http://www.roadtrucker.com/forum/cli...reeview-min.js

http://www.roadtrucker.com/forum/cli...imation-min.js

So basically, /forum/clientscript/yui is missing when VB writes these links in the WebPages.


The install file has this line: var yuipath = 'clientscript/yui'; which obviously assigns "clientscript/yui" to yuipath and I would think that somewhere, "http://www.roadtrucker.com/forum/" would be assigned before that.

I do not want to reinstall, since the forum has been up and running for a while now and we have upgraded at least 2 and I think 3 times.

This assignment has to be in the database someplace, but I am unable to find it. I searched the templates, but no luck there. I can see where it writes the webpage, but I can not see where it actually gets assigned.

Has anyone dug into the VB code enough to understand this? Any help will be greatly appreciated. Thanks
Reply With Quote
  #2  
Old 07-13-2014, 05:07 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Look in the setting under "Server Settings and Optimization Options", there are some path settings for YUI.

If those look OK, then chck your headinclude template for a section like this:
Code:
<script type="text/javascript">
<!--
	if (typeof YAHOO === 'undefined') // Load ALL YUI Local
	{
		document.write('<script type="text/javascript" src="clientscript/yui/yuiloader-dom-event/yuiloader-dom-event.js?v={vb:raw vboptions.simpleversion}"><\/script>');
		document.write('<script type="text/javascript" src="clientscript/yui/connection/connection-min.js?v={vb:raw vboptions.simpleversion}"><\/script>');
		var yuipath = 'clientscript/yui';
		var yuicombopath = '';
		var remoteyui = false;
	}
	else	// Load Rest of YUI remotely (where possible)
	{
		var yuipath = '{vb:stylevar yuipath}';
		var yuicombopath = '{vb:stylevar yuicombopath}';
		var remoteyui = true;
		if (!yuicombopath)
		{
			document.write('<script type="text/javascript" src="{vb:stylevar yuipath}/connection/connection-min.js?v={vb:raw vboptions.simpleversion}"><\/script>');
		}
	}

and make sure it hasn't been changed or removed.
Reply With Quote
3 благодарности(ей) от:
Lynne, Max Taxable, tbworld
  #3  
Old 07-14-2014, 07:34 PM
ae3799t ae3799t is offline
 
Join Date: Nov 2012
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated.. See end.

Thanks kh99. I have the following settings, which looks ok to me:
Use Remote YUI: Yahoo
Custom Remote YUI Path: ""
Custom Remote YUI Combo Path: ""

Here is that section of code and it looks ok, as far as I can tell:
if (typeof YAHOO === 'undefined') // Load ALL YUI Local
{
document.write('<script type="text/javascript" src="clientscript/yui/yuiloader-dom-event/yuiloader-dom-event.js?v={vb:raw vboptions.simpleversion}"><\/script>');
document.write('<script type="text/javascript" src="clientscript/yui/connection/connection-min.js?v={vb:raw vboptions.simpleversion}"><\/script>');
var yuipath = 'clientscript/yui';
var yuicombopath = '';
var remoteyui = false;
}
else // Load Rest of YUI remotely (where possible)
{
var yuipath = '{vb:stylevar yuipath}';
var yuicombopath = '{vb:stylevar yuicombopath}';
var remoteyui = true;
if (!yuicombopath)
{
document.write('<script type="text/javascript" src="{vb:stylevar yuipath}/connection/connection-min.js?v={vb:raw vboptions.simpleversion}"><\/script>');
}
}
------ Updated -----
Php is not my strong suite, but this looks like if I have "Use Remote YUI: Yahoo" defined, yuipath does not get assigned in the else statement. There is an assignment, but if it is empty, it assigns nothing. So where does it get assigned to the Yahoo CDN?

Should I remove this.. "Use Remote YUI: Yahoo"? Thanks
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 05:40 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.03553 seconds
  • Memory Usage 2,191KB
  • 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
  • (3)post_thanks_box
  • (3)post_thanks_box_bit
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete