Skip to:
Content

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#785 closed defect (fixed)

bbpress does not deal well with a title of just a comma

Reported by: _ck_ Owned by: mdawaffe
Milestone: 0.9 Priority: normal
Severity: major Version: 0.8.3.1
Component: Back-end Keywords:
Cc:

Description

Try creating a new topic with just a comma as the title.
Then try going to it from the post list.
Then try deleting it from the admin interface.

Bad sanitize?

Change History (8)

comment:1 fel646 years ago

Taken from t3ch33's report: http://bbpress.org/forums/topic/characters-like-commas-in-topic-title-cause-errors

On my site, if you enter just a comma in the "topic title," the error "No input file specified." appears.

Any plans on fixing this?

I also tested it on this site, and the error "This topic has been closed" appeared. (So, I hit the back button and entered a real post-this one. Once I posted this post, I realized that it was marked as "resolved.")

comment:2 mdawaffe6 years ago

The problem is that the slug was being sanitize to "".

This is half fixed by [1107].

Now when new topics are submitted that generate an empty slug, the topic is not created, and an unhelpful error message is displayed (This topic is closed).

We can either

  1. Catch the error earlier and show a more pertinent message (Topic title invalid. blah blah).
  2. If the generated slug is empty, fill it with something generic like "0-x", and create the topic. (x is an incrementor to preserve slug uniqueness, 0 just because that's how we roll.)

Both are easy to implement.

comment:3 mdawaffe6 years ago

  • Owner set to mdawaffe
  • Status changed from new to assigned

comment:4 _ck_6 years ago

If you are soliciting for votes on the solution, I prefer "b" because option "a" is just one more customization problem that would be hard coded into the core.

If it's easy enough, please add an action or filter to this method (just BEFORE the slug and/or error message is generated so the process can be altered if desired) thanks!

comment:5 sambauers6 years ago

+1 for option b here although we could be a little more creative with the main part of the slug. "insane-1" springs to mind. :)

comment:6 sambauers6 years ago

  • Milestone set to 0.8.4

comment:7 mdawaffe6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [1219]) allow topic titles and topic slugs which sanitize to false fixes #785 for branches/0.8

comment:8 mdawaffe6 years ago

  • Version set to 0.8.3.1

[1218]

I decided to go for option b with "0-1" instead of something clever. Clever words in urls will make SEO people angry. And angry SEO people are really annoying.

Note: See TracTickets for help on using tickets.