#785 closed defect (fixed)
bbpress does not deal well with a title of just a comma
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | Back-end | Version: | 0.8.3.1 |
| Severity: | major | 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)
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
- Catch the error earlier and show a more pertinent message (Topic title invalid. blah blah).
- 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.
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!
+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. :)
- Resolution set to fixed
- Status changed from assigned to closed
Taken from t3ch33's report: http://bbpress.org/forums/topic/characters-like-commas-in-topic-title-cause-errors