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

CommentFileSizeAuthor
#1 2305291_1_poll_title.patch390 bytesscor

Comments

scor’s picture

Status: Active » Needs review
StatusFileSize
new390 bytes

Status: Needs review » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Looks 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.

dcam’s picture

Status: Needs review » Reviewed & tested by the community
scor’s picture

Issue summary: View changes

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1: 2305291_1_poll_title.patch, failed testing.

Status: Needs work » Needs review

dcam queued 1: 2305291_1_poll_title.patch for re-testing.

dcam’s picture

Status: Needs review » Reviewed & tested by the community
David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x - thanks!

  • David_Rothstein committed 0091b69 on 7.x
    Issue #2305291 by scor: Fixed Poll title should have same length as...
scor’s picture

Thank you David for ending this issue status dance with the testbot :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.