PDA


View Full Version : Description Text lost on Preview


Carsten
08-06-2008, 09:46 AM
When previewing a link that has errors, the changes are lost.

Steps to reproduce

http://www.vbadvanced.com/links/addlink.php?c=0
Enter some URL, select a category, click Continue
In the following From, clear the input field 'Web Site Name' (or leave empty required custom fields, etc.)
Enter some lengthy description text
Click 'Preview'


=> The description text is lost, you are back at step 2)

This should not happen.

Brian
08-06-2008, 01:07 PM
Thank you for pointing this out. I've just applied the fix to the links/addlink.php file in the download package here, so if you will download the files again and update that file on your server, that should take care of the issue.
Or if you would rather apply the fix manually, look in the file for this code:
// ##### Errors from initial submit link page
if (!empty($errors) AND $_POST['do'] == 'addlink' AND !$haderrors)
{
$_REQUEST['do'] = 'newlink';

require_once(DIR . '/includes/functions_newpost.php');
$linkerrors = construct_errors($errors);
}


And repalce with this:
// ##### Errors from initial submit link page
if (!empty($errors) AND $_POST['do'] == 'addlink' AND !$haderrors)
{
if (!$vbulletin->GPC['preview'])
{
$_REQUEST['do'] = 'newlink';
}

require_once(DIR . '/includes/functions_newpost.php');
$linkerrors = construct_errors($errors);
}