user unable to save signature

Ryan Kent

Well-known member
While troubleshooting an issue, I tried to save a signature and received an error. I copied/pasted this sig into the signature message box. I have copied/pasted my sig and it worked fine. Another user is using this sig and it works fine as well. The sig is 16 kb.

SigError.webp
 
Signatures are subject to this length:

Admin CP -> Home -> Options -> Messages -> Maximum Message Length
I must say I haven't played with signatures but are you telling me that the signature maximum length has to be the same size as the message maximum length? That doesn't seem very ideal... I don't fancy 10-15,000 characters and I don't fancy 100 character posts... :confused:
 
The max length is set in the DW
PHP:
'signature'  => array('type' => self::TYPE_STRING, 'default' => '', 'maxLength' => 65535),
 
Signatures are subject to this length:

Admin CP -> Home -> Options -> Messages -> Maximum Message Length
No, they aren't

The signature doesn't have a htmlcharacterlimit, => so it gets the defaultvalue => -1
Because of this, the limit is set to 4* messageMaxLenght;)

PHP:
public function getMessageText($inputName, XenForo_Input $input, $htmlCharacterLimit = -1)
if ($messageTextHtml !== '')
{

if ($htmlCharacterLimit < 0)
{
$htmlCharacterLimit = 4 * XenForo_Application::get('options')->messageMaxLength;
// quadruple the limit as HTML can be a lot more verbose
}

if ($htmlCharacterLimit && utf8_strlen($messageTextHtml) > $htmlCharacterLimit)
{
throw new XenForo_Exception(new XenForo_Phrase('submitted_message_is_too_long_to_be_processed'), true);
}
 
I appreciate your replies. Does anyone know why that error message is appearing in this case when I copy/paste a single image? I have copied/pasted images before in the signature box and it has worked fine. Actually, my current sig of DrHouse below is an image copy/paste.
 
Once you copy and paste the image, switch to the plaintext editor and report what you see (if anything). Just a hunch.

very good call. It starts off with http://www.terapvp.com/community/data:image/png;base64

then it continues with thousands of random characters. Not sure why it is doing that, but it is clearly the issue. I'll try a work around.
 
noob question...that means I need to upload the image to a host and paste the link, correct? I can't just copy/paste?
I take it you were copying the image from your local computer? That's why your limit is exceeding, because the image is base64 encoded and basically just created using codes (thousands upon thousands of them).

Upload the image to your server and link to it from there :)
 
No, they aren't

The signature doesn't have a htmlcharacterlimit, => so it gets the defaultvalue => -1
Because of this, the limit is set to 4* messageMaxLenght;)

PHP:
public function getMessageText($inputName, XenForo_Input $input, $htmlCharacterLimit = -1)
if ($messageTextHtml !== '')
{

if ($htmlCharacterLimit < 0)
{
$htmlCharacterLimit = 4 * XenForo_Application::get('options')->messageMaxLength;
// quadruple the limit as HTML can be a lot more verbose
}

if ($htmlCharacterLimit && utf8_strlen($messageTextHtml) > $htmlCharacterLimit)
{
throw new XenForo_Exception(new XenForo_Phrase('submitted_message_is_too_long_to_be_processed'), true);
}

Where put this code? Works to limit the signatures to 255 Characters?
 
Top Bottom