vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Custom pages are causing errors with relative path references (https://vborg.vbsupport.ru/showthread.php?t=286229)

bzcomputers 08-02-2012 03:51 PM

Custom pages are causing errors with relative path references
 
I have created custom pages in vb 4.2 that reside outside the /forum directory using this method:

[HOW TO - vB4] Create your own vBulletin page

The issue I'm having is that references to certain directories being called by vB are showing as relative and not the absolute path causing errors to be reported for the pages. Directories like:

/images/misc
/images/cms
/images/site_icons
/clientscript

Not only are the errors showing for the custom pages but also for my CMS which also resides outside the /forum subdirectory and is setup in the root of my domain.

All pages seem to display correctly but cPanel is reporting about 5 errors per page each time they are rendered. BBURL appears to be set correctly, but it seems the issue may be related to it.

Any help would be appreciated, thanks.

kh99 08-02-2012 05:32 PM

Quote:

Originally Posted by bzcomputers (Post 2353708)
All pages seem to display correctly but cPanel is reporting about 5 errors per page each time they are rendered.


Do you know exactly what the errors are? edit: oh, you did list some of the problem directories. But if you find a url that's bad then search the html source of the page for that url, you might be able to figure out why it's not working.

bzcomputers 08-02-2012 06:49 PM

It is throwing an error for every single relative url reference on the page. I personally used full (absolute) urls in all my custom work, so the errors are coming from relative urls from vBulletin's own templates that are being called like "headinclude", "navbar", etc.

For example these are the errors produced by just my CMS page that resides in the root:
Code:

[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/cms, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/cms, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/cms, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/buttons, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/cms, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/site_icons, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/cms, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/misc, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/misc, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:47 2012] [error] File does not exist: /home/cruisin/public_html/images/customlogos, referer: http://www.cruisin.me/
[Thu Aug 02 14:25:46 2012] [error] File does not exist: /home/cruisin/public_html/clientscript, referer: http://www.cruisin.me/


The odd thing is the pages still seem to render correctly.

kh99 08-02-2012 07:04 PM

Did you edit those errors? Because it seems kind of strange that they are directory names and not files (although I don't have all that much experience with web server logs, maybe that's normal?).

In any case, in the settings under "Site Name / URL / Contact Details", what do you have for "Always use Forum URL as Base Path" (or I guess more importantly, if you view your page html source, is there a base tag, and if so, is it correct)?

bzcomputers 08-02-2012 07:17 PM

No, I didn't edit them it is actually showing the error on the directory in all cases.

Forum URL: http://www.cruisin.me/forum
Always use Forum URL as Base Path: Yes

Forum Component URL: http://www.cruisin.me/forum
CMS Component URL: http://www.cruisin.me
Blog Component URL: http://www.cruisin.me/blog

The Source Code for CMS in root:
Code:

var SESSIONURL = "";
        var IMGDIR_MISC = "images/misc";
        var IMGDIR_BUTTON = "images/buttons";
        var vb_disable_ajax = parseInt("0", 10);
        var SIMPLEVERSION = "420";
        var BBURL = "http://www.cruisin.me/forum";
        var LOGGEDIN = 1 > 0 ? true : false;
        var THIS_SCRIPT = "vbcms";
        var RELPATH = "";
        var PATHS = {
                forum : "http://www.cruisin.me/forum",
                cms  : "http://www.cruisin.me",
                blog  : "http://www.cruisin.me/blog"
        };
        var AJAXBASEURL = "http://www.cruisin.me/";

Source code for custom page:
Code:

var SESSIONURL = "";
        var IMGDIR_MISC = "images/misc";
        var IMGDIR_BUTTON = "images/buttons";
        var vb_disable_ajax = parseInt("0", 10);
        var SIMPLEVERSION = "420";
        var BBURL = "http://www.cruisin.me/forum";
        var LOGGEDIN = 1 > 0 ? true : false;
        var THIS_SCRIPT = "infoandtips";
        var RELPATH = "info/carnival/";
        var PATHS = {
                forum : "http://www.cruisin.me/forum",
                cms  : "http://www.cruisin.me",
                blog  : "http://www.cruisin.me/blog"
        };
        var AJAXBASEURL = "http://www.cruisin.me/info/carnival/";


John Lester 08-03-2012 05:34 AM

Shouldn't this
Code:

var RELPATH = "info/carnival/";
Be this
Code:

var RELPATH = "/info/carnival/";

bzcomputers 08-06-2012 05:19 PM

Anyone else want to take a try at this ...still no solution.

kh99 08-07-2012 02:33 PM

You said in the first post that custom pages are causing the errors - what pages are those? The error log just shows http://www.cruisin.me/. When I look at that page using firebug I don't see any "file not found" errors, and I don't see any requests to those paths mentioned in the errors (except in cases where they have a valid file name on the end).

bzcomputers 08-07-2012 04:04 PM

Quote:

Originally Posted by kh99 (Post 2355262)
You said in the first post that custom pages are causing the errors - what pages are those? The error log just shows http://www.cruisin.me/. When I look at that page using firebug I don't see any "file not found" errors, and I don't see any requests to those paths mentioned in the errors (except in cases where they have a valid file name on the end).

All of the linked pages from this starting point are throwing similar errors:

http://www.cruisin.me/info/carnival/

Code:

[Tue Aug 07 11:47:36 2012] [error] File does not exist: /home/cruisin/public_html/info/carnival/images/misc, referer: http://www.cruisin.me/info/carnival/
[Tue Aug 07 11:47:36 2012] [error] File does not exist: /home/cruisin/public_html/info/carnival/images/misc, referer: http://www.cruisin.me/info/carnival/
[Tue Aug 07 11:47:35 2012] [error] File does not exist: /home/cruisin/public_html/info/carnival/images/site_icons, referer: http://www.cruisin.me/info/carnival/
[Tue Aug 07 11:47:35 2012] [error] File does not exist: /home/cruisin/public_html/info/carnival/images/site_icons, referer: http://www.cruisin.me/info/carnival/
[Tue Aug 07 11:47:35 2012] [error] File does not exist: /home/cruisin/public_html/info/carnival/images/customlogos, referer: http://www.cruisin.me/info/carnival/
[Tue Aug 07 11:47:35 2012] [error] File does not exist: /home/cruisin/public_html/info/carnival/mobiquo, referer: http://www.cruisin.me/info/carnival/
[Tue Aug 07 11:47:35 2012] [error] File does not exist: /home/cruisin/public_html/info/carnival/clientscript, referer: http://www.cruisin.me/info/carnival/

But again pages seem to render correctly.

I think you may have been onto something when you mentioned the references were all to directories and not specific files. I think there may be a vB setting that is off and not the actual pages that are causing the errors.

The errors are not always the same for the pages either. For instance this page had 3 different people go to it with seconds of each other and 1 of the 3 sent different errors:

http://www.cruisin.me/info/carnival/alcohol.php

Code:

[Tue Aug 07 11:57:35 2012] [error] [client A] File does not exist: /home/cruisin/public_html/info/carnival/clientscript, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:57:35 2012] [error] [client A] File does not exist: /home/cruisin/public_html/info/carnival/clientscript, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:57:35 2012] [error] [client A] File does not exist: /home/cruisin/public_html/info/carnival/clientscript, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:48:09 2012] [error] [client B] File does not exist: /home/cruisin/public_html/info/carnival/images/misc, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:48:09 2012] [error] [client B] File does not exist: /home/cruisin/public_html/info/carnival/images/misc, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:48:09 2012] [error] [client B] File does not exist: /home/cruisin/public_html/info/carnival/images/site_icons, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:48:09 2012] [error] [client B] File does not exist: /home/cruisin/public_html/info/carnival/images/site_icons, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:48:09 2012] [error] [client B] File does not exist: /home/cruisin/public_html/info/carnival/clientscript, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:48:09 2012] [error] [client B] File does not exist: /home/cruisin/public_html/info/carnival/images/customlogos, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:47:51 2012] [error] [client C] File does not exist: /home/cruisin/public_html/info/carnival/clientscript, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:47:51 2012] [error] [client C] File does not exist: /home/cruisin/public_html/info/carnival/clientscript, referer: http://www.cruisin.me/info/carnival/alcohol.php
[Tue Aug 07 11:47:51 2012] [error] [client C] File does not exist: /home/cruisin/public_html/info/carnival/clientscript, referer: http://www.cruisin.me/info/carnival/alcohol.php

(swapped ip addresses for letters A-C above)


All times are GMT. The time now is 12:58 AM.

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.01456 seconds
  • Memory Usage 1,776KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_quote_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