Anonymous Login
06-18-2018 04:39 PM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004583SMF 2.0Generalpublic2011-01-02 14:40
Summary0004583: Long titles of holidays are cut off
DescriptionVery long titles (in russian and ukrainian languages) of holidays are cut off — in database, in Calendar.

Solution: type of "title" field in smf_calendar_holidays should be changed to "text" ("varchar(60)" instead).
Steps To ReproduceAdd any holiday with very long title to database
TagsNo tags attached.
Attached Files




Bugo (Beta Tester)

The same problem in SMF 1.x


Mark Rose (Beta Tester)

Just make the varchar longer. How long does it need to be?


Bugo (Beta Tester)

Why not change type to "TEXT"? The length of titles should be various, without any limits.


Mark Rose (Beta Tester)

If any queries involving a text column cannot be retrieved/sorted with just the index, having the text column forces the filtering/sorting to disk.

Furthermore, text columns in MyISAM are stored external to the row, greatly increasing the disk seeking during retrieval. InnoDB will store them in the row if less than 512 bytes.

Significant performance improvements were found by changing the tinytext columns in SMF to varchar. See this thread:


Bugo (Beta Tester)

Ok, then VARCHAR(200)


Mark Rose (Beta Tester)

Might as well make it varchar(255). There's no real benefit to keeping it shorter on a small table.


vbgamer45 (SMF Friend)

! Made title column for calender events and holidays larger to handle long events and holidays (install*.sql upgrade*.sql) Revision 10313


Aaron (SMF Friend)

No use changing the data type if you're not gonna change the template to allow longer input.

Line 128 in Calendar.template.php:
                        <input type="text" name="evtitle" maxlength="70" size="70" value="', $context['event']['title'], '" class="input_text" />

Line 219 in Post.template.php:

                            <input type="text" name="evtitle" maxlength="60" size="60" value="', $context['event']['title'], '" tabindex="', $context['tabindex']++, '" class="input_text" />


vbgamer45 (SMF Friend)

Good find. Made the changes for max length for those fields. Makes me wonder how the holidays got cut off in the first if you couldn't exceed the max length.
MantisBT (Modified for SMF Intergration)[^] Copyright © 2000 - 2010 Mantis Group