Advertisement:
NameCheap

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004583SMF 2.0Generalpublic2010-12-28 03:402011-01-02 14:40
ReporterBugo 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
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 Filespng file icon holidays.png [^] (50,903 bytes) 2010-12-28 03:40

- Relationships

-  Notes
(0013550)
Bugo (Beta Tester)
2010-12-28 03:43

The same problem in SMF 1.x
(0013551)
Mark Rose (Beta Tester)
2010-12-28 10:01

Just make the varchar longer. How long does it need to be?
(0013552)
Bugo (Beta Tester)
2010-12-28 10:12

Why not change type to "TEXT"? The length of titles should be various, without any limits.
(0013553)
Mark Rose (Beta Tester)
2010-12-28 11:53

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: http://www.simplemachines.org/community/index.php?topic=289878.0 [^]
(0013554)
Bugo (Beta Tester)
2010-12-28 12:11

Ok, then VARCHAR(200)
(0013555)
Mark Rose (Beta Tester)
2010-12-28 12:40

Might as well make it varchar(255). There's no real benefit to keeping it shorter on a small table.
(0013556)
vbgamer45 (SMF Friend)
2010-12-28 21:38

! Made title column for calender events and holidays larger to handle long events and holidays (install*.sql upgrade*.sql) Revision 10313
(0013559)
Aaron (SMF Friend)
2011-01-02 12:22

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" />
(0013561)
vbgamer45 (SMF Friend)
2011-01-02 14:39

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 1.2.8 (Modified)[^] Copyright © 2000 - 2010 Mantis Group