• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Archive re-directs.

PVO_Dave

Active member
#1
Hi,

Sorry for posting in this section, but I've had no replys in the thread for this or the VB4 version add-on.

We are losing visitors still as the archive urls are not re-directing properly.

A sample of the server error log:

Code:
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 1 minute ago - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Delete...
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 1 minute ago - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Delete...
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 1 minute ago - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Delete...
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 1 minute ago - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Delete...
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 2 minutes ago - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Delete...
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 2 minutes ago - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Delete...
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 2 minutes ago - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Delete...
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 2 minutes ago - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Delete...
preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 2 minutes ago - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Can anyone help shed some light on this? :(

Dave.
 

Jake Bunce

XenForo moderator
Staff member
#2
Same error as this thread:

http://xenforo.com/community/threads/problems-importing-from-smf-over-vb.15808/

The fix is in the second post. You need to edit the archive/index.php file and add a "P" to the sub-pattern, like so:

Code:
XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);

$target = false;
if (preg_match('#/archive/index.php(/|\?)(?P<type>f|t)-(?P<id>\d+)\.html#si', $_SERVER['REQUEST_URI'], $input))
{
	$importModel = XenForo_Model::create('XenForo_Model_Import');
	$target = false;

	switch ($input['type'])
	{