Topic Links 2.2 Archive Fix Link

Hover over a topic link in the archive. A broken installation will show:

You might wonder, "Who still uses vBulletin 2.2?" The answer is more common than you think.

If you have access to an unpatched archive/ folder from the original distribution, the bug will be present by default. The fix was never included in the official 2.2 release—only in later custom patches.

RewriteRule ^t-([0-9]+).html.html$ t-$1.html [R=301,L]

RewriteCond %REQUEST_FILENAME !-f RewriteCond %REQUEST_FILENAME !-d RewriteRule ^t-([0-9]+)(.html)?$ index.php?t=$1 [L,NC,QSA]

We didn't have the source code for the original 2.2 parser. But we had 12,000 archived HTML files and a SQL dump of the original topic map. Here is the fix we built. Topic Links 2.2 Archive Fix

This patch modifies the archive/global.php and archive/index.php files.

Backup first: Always create backups of your archive directory.

Step 1: Edit archive/global.php

Find the function construct_archive_link (around line 120). Original code often looks like:

function construct_archive_link($threadid)
return "index.php/t-".$threadid.".html";

Replace it with:

function construct_archive_link($threadid)
global $vboptions;
    // Fix for double extension and malformed links
    $link = "index.php/t-" . intval($threadid);
    if ($vboptions['archiveext'] == '.html') 
        $link .= ".html";
return $link;

Step 2: Edit archive/index.php

Find the line that parses the PATH_INFO or QUERY_STRING (usually near line 45). Look for:

$threadid = intval(substr($QUERY_STRING, 2));

Change it to:

// Topic Links 2.2 Archive Fix - Improved parsing
$path = getenv('PATH_INFO');
if ($path && preg_match('#/t-([0-9]+)(\.html)?#i', $path, $matches)) 
    $threadid = intval($matches[1]);
 else 
    $threadid = intval(substr($QUERY_STRING, 2));

Step 3: Save and Test

Upload the modified files, clear your browser cache, and test a topic link. It should now resolve correctly. Hover over a topic link in the archive

If you have been in the technical documentation, knowledge management, or legacy forum space for longer than a decade, you have likely run into a specific, silent data rot issue: The Topic Links 2.2 breakage.

It doesn't scream. It doesn't throw a 404 error page. It just sits there—a blue, underlined link pointing into the void of an old .chm file, a corrupted help database, or a frozen SharePoint archive.

Recently, while digging through a backup of a mid-2000s developer wiki, I finally had to confront this beast head-on. After three days of scripting and hex comparisons, the solution emerged: what I now call the "Topic Links 2.2 Archive Fix."

Here is what broke, why it matters, and how we fixed it.