Advertisement:
Anonymous Login
12-07-2016 09:22 AM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004583SMF 2.0Generalpublic2011-01-02 14:40
ReporterBugo 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
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

-Relationships
+Relationships

-Notes

bugnote:0013550

Bugo (Beta Tester)

The same problem in SMF 1.x

bugnote:0013551

Mark Rose (Beta Tester)

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

bugnote:0013552

Bugo (Beta Tester)

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

bugnote:0013553

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: http://www.simplemachines.org/community/index.php?topic=289878.0

bugnote:0013554

Bugo (Beta Tester)

Ok, then VARCHAR(200)

bugnote:0013555

Mark Rose (Beta Tester)

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

bugnote:0013556

vbgamer45 (SMF Friend)

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

bugnote:0013559

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" />

bugnote:0013561

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.
+Notes
MantisBT (Modified for SMF Intergration)[^] Copyright © 2000 - 2010 Mantis Group