Quote Originally Posted by keithdoxey

my guess is that it is caused by the call "vBulletin_init();" at the bottom of the page.

Not sure what this function does as it isnt visible in the page. It is probably in one of the following included files

clientscript/vbulletin_global.js
clientscript/vbulletin_menu.js

I would just like to wish Lester the best of luck in tracking this one down!
OK. Been looking a bit deeper into this and have discovered why some of the forums are broken and others are OK. Its to do with the number of threads.

I have found the location of "vBulletin_init();"

It is in the vbulletin_global.js file and the error message points to line 1520 which is in the middle of "vBulletin_init"

This is the section causing the problem.....

[1516] // process the pagenavs popup form
[1517] if (typeof addr != 'undefined')
[1518] {
[1519] fetch_object('pagenav_form').addr = addr;
[1520] fetch_object('pagenav_form').gotopage = vBpagenav.prototype.form_gotopage;
[1521] fetch_object('pagenav_ibtn').onclick = vBpagenav.prototype.ibtn_onclick;
[1522] fetch_object('pagenav_itxt').onkeypress = vBpagenav.prototype.itxt_onkeypress;
[1523] }


.... line 1520 actually starts with three "TABS" so the "f" of fetch_object is char 4 which is where it says the error is but as the error reported is....

"null" is null or not an object

....it probably refers to the line 1519 with "addr" not being correctly set.

"addr" is initially defined at line 1503 as follows....

var addr = pagenavs[n].title;

... in the section that is titled "add popups to pagenav elements"

The forums that work OK are the ones with only a single page of topics. The forums with more than one page are the ones that bring up the error.

Multipage forums show an additional nav bar "page 1 of n" top and bottom of the main window. This gets drawn OK but the dropdown arrow doesnt appear to do anything which I think is also related to this same problem.

Dont ask me any more about fixing it cause I didnt write it... just reverse engineering it :-)

Strange way to write it though doing a chunk of page creation client side. I would have made PHP do the dirty work server side rather than leave it to the mercy of a browser to handle!

Regards