Problem/Motivation
The poll module title is limited to 128 characters, even though the database schema allows for 255 characters. This is due to the fact that poll_form() redefines the edit form without specifying the maxlength of the title element. The default length of a textfield in the form API is 128.
from poll_form():
$form['title'] = array(
'#type' => 'textfield',
'#title' => check_plain($type->title_label),
'#required' => TRUE,
'#default_value' => $node->title,
'#weight' => -5,
);
node_content_form() forces the length to 255:
$form['title'] = array(
'#type' => 'textfield',
'#title' => check_plain($type->title_label),
'#required' => TRUE,
'#default_value' => $node->title,
'#maxlength' => 255,
'#weight' => -5,
);
poll.module was removed from D8, so filing this against D7 directly.
Proposed resolution
Force length of poll.module title form element to 255.
Remaining tasks
patch
User interface changes
none
API changes
none
Comments
Comment #1
scor commentedComment #4
dcam commentedLooks like that was yet another unrelated test crash.
RTBC once #1 comes back green. Before applying, the Poll edit form title element #maxlength is 128. After applying #1, the #maxlength is 255, the size of the title field in the node table.
Comment #5
dcam commentedComment #6
scor commentedComment #9
dcam commentedComment #12
dcam commentedComment #15
dcam commentedComment #18
dcam commentedComment #21
dcam commentedComment #24
dcam commentedComment #27
dcam commentedComment #30
dcam commentedComment #33
dcam commentedComment #36
dcam commentedComment #39
dcam commentedComment #42
dcam commentedComment #43
David_Rothstein commentedCommitted to 7.x - thanks!
Comment #45
scor commentedThank you David for ending this issue status dance with the testbot :)