impossible length titles cause oopes

Bug #583623 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Unassigned

Bug Description

OOPS-1601O1172 was caused when the user pasted an error log into the title field. The field should restrict the title to a rasonable length. 50 is more than enough to start the question.

  OperationalError: target lists can have at most 1664 entries

Related branches

Revision history for this message
Данило Шеган (danilo) wrote :

My gut feeling tells me it's not enough, and the data below seems to confirm.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Thanks. I think we need to enforce what we ask for. We are askig for a "A one-line summary of the issue or problem." for searching. The user does not create a question with details until after he has verified the potential matches. The field should not accept more than one sentence.

Revision history for this message
Curtis Hovey (sinzui) wrote :

We had 3 examples of this this week. OOPS-1673N747

Revision history for this message
Robert Collins (lifeless) wrote :

Also having many terms will make the search engine have a hernia with the current production code (it |'s the terms), and with the new code about to come in it will just return zilch if they put in a lot of irrelevant stuff.

Changed in launchpad-answers:
importance: Low → High
Revision history for this message
Robert Collins (lifeless) wrote :

Bumping to high as per the zero oops policy

Ursula Junque (ursinha)
description: updated
Revision history for this message
Curtis Hovey (sinzui) wrote :

The summary/title must be readable by people as well as work for the search engine. Two lines in question headings and listing is roughly 120 characters, which falls in the 46-60 character per line guideline when formatting readable lines in latin characters. This enough information to search, and more than enough information to start the answer contact to work on an question. 1.9% of questions exceed 120 characters, and these question titles are hard to read and they make the text arround them hard to read.

Revision history for this message
Curtis Hovey (sinzui) wrote :

I would like to fix this by setting the max size of the field to 120, but there are 2325 question that exceed that length--they need to be trunctated., 57 of which are are classified as open or needs-information, and I am not sure I want to truncate the title of an open question. Most of these problem questions are pastes of error logs. I have seen a few questions titles written by users in the 120 to 150 range of characters, and are providing more than a summary of the problem.

There is also the issue that bugs can be converted to questions. Bugs also have no limit on their titles.

The alternate approach is to enforce the limit in the view that creates the question. Its validate method could add an error with a message that asks the user to describe the problem in less than 120 characters. This allows bugs to be converted to questions without convern about the length of the title. Consider that if answers were to be exposed over the API, users could create questions ridiculous lengths?

Revision history for this message
Curtis Hovey (sinzui) wrote :

I Looked at how bug reporting works and I am astonished that the guilde view works exactly like answers, using the same mechanisms, yet is not getting nearly as many insane summaries. 250 characters looks like the magic number in Lp Bugs: 516 (0.0008% of all bugs) exceed the 250 characters. There is no evidence of any oopses caused by nl_phrase returning more phrases than can be handled. Answers has 310 (0.002%) and it oopses every month. Answers has a different user base and that may be the reason that the difference in large titles.

The simplest fix for this issue is to use displayMaxWidth=250 in the QuestionAddView. Changing the field may not be worth the effort since we want bugs and questions to be interchangable.
     custom_widget('title', TextWidget, displayWidth=40, displayMaxWidth=250)

Curtis Hovey (sinzui)
Changed in launchpad-answers:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
milestone: none → 10.09
Curtis Hovey (sinzui)
Changed in launchpad-answers:
status: In Progress → Fix Committed
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-answers:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.