Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Bug: Max Signature Size
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug: Max Signature Size

 Post Reply Post Reply
Author
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Topic: Bug: Max Signature Size
    Posted: 20 April 2006 at 3:15am
I just found something weird on this site.  I went into my profile and entered a signature just under 200 characters long (including BBCode).  The message in the profile said it allowed 200 characters.  However, when I previewed it, and when I saved it, it appeared to cut it off at approx. 150 characters.  In fact, it orginally cut off the signature in the middle of a link tag, which screwed up any posts where I had posted (since the tag got cut off and was never closed).
 
Perhaps it says 200 in one place and 150 in another?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2006 at 9:41am
Once the BBCode is converted into HTML code it might pad up your signature to over 200 characters.
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2006 at 3:42pm
That's what I suspected because when I went back to edit it, it showed HTML instead of BBCode for one of the links, the one that got chopped off in the middle.
 
And when I viewed any posts with my chopped off signature, it broke all the tables because the last link was
<a href="http://www.cutoffdoma
which you will notice is missing the closing > bracket, which screws up any page the signature is showed on.
 
Perhaps you need to allow more than 200 characters in the database knowing that the BBCode gets converted to HTML.
 
Example: [url ]http://www.caribbeanchoice.com[/url ] seems to get converted to [ url=http://www.caribbeanchoice.com]http://www.caribbeanchoice.com[/url ] which is twice as long and is saved in the database as <a href="http://www.caribbeanchoice.com" target="_blank">http://www.caribbeanchoice.com</a>.  And if you have multiple links like that and they all do that, it is possible for one of the links to get cutoff mid-tag.


Edited by wistex - 20 April 2006 at 3:47pm
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2006 at 9:48am
I believe I actually set the database up to do the chop at 255 characters.

The reason for this is database performance.

Most supported databases only allow 255 characters in a character column, any more than this and you need to use 'text', 'memo' etc. datatypes.

These datatypes that allow larger amount of text also use more database resources as an entire page with pointers etc. inside the database system itself have to be setup just for this one field, rather than all the tables columns being includes in one page. Which not only uses allot more space within the database to store this data but also means that queries on these fields are slower and more resource intensive.


Edited by -boRg- - 21 April 2006 at 11:41am
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2006 at 11:43am
I have just checked in the code and the above is correct.

the user can enter upto 200 characters in their signature, any BBCodes are then converted to HTML, then so that the database field doesn't return an error only the first 255 characters are allowed.

In 99.9% of circumstances this should work fine, you will only get this problem if you enter lots of links which are much shorter in BBcode.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.