Fork me on GitHub
Subscribe 3

Ticket #8 (fixed enhancement)

Stripping empty BBCodes results in empty message error

  • Created: 2010-05-23 21:16:38
  • Reported by: Franz
  • Assigned to: Franz
  • Milestone: 1.4.3
  • Component: usability
  • Priority: normal

The quote max depth limit isn't working as it should at the moment. It should discard the inner most quotes and only keep the X most relevant ones. Just now the whole post seems to get emptied.

History

Reines 2010-05-23 21:40:56

I think what actually happens here is the max quote depth is reached, so the inner most quote is removed. If the outer quotes then were empty quotes (i.e. just quoted without adding any additional text) the tags become totally empty, and are hence removed.

What might be best is some form of warning alerting the user that the quote depth has been reached and as such the quotes have been pruned.

Franz 2010-05-24 00:30:56

I'm not sure you're right. Why would somebody quote the quote of a quote of a quote etc.?

It is highly unlikely that somebody quotes without adding any comment. And that would have to be done like four times in a row (or whatever the limit is).

Smartys 2010-05-25 06:30:23

Just tested it and I can confirm Reines's analysis.

[quote=Bob][quote=Bob][quote=Bob][quote=Bob]Foo[/quote]Foo[/quote][/quote][/quote]

is displayed as three nested quotes.

[quote=Bob][quote=Bob][quote=Bob][quote=Bob]Foo[/quote][/quote][/quote][/quote]

results in all quotes disappearing.

Franz 2010-05-25 13:49:29

Yeah, but still: Why would somebody do that? And shouldn't we just display a warning without pruning?

Franz 2010-05-25 21:24:08

I tested this and it shows you're right (as always tongue). This seems to be working correctly. I wonder if the behaviour mentioned above really is a problem, due to its low probability...

Franz 2010-05-25 21:33:15

  • Owner set to Franz.

Franz 2010-05-25 22:10:41

  • Component changed from parser to usability.
  • Type changed from bug to enhancement.

This isn't really a bug, just an improvement in user-friendliness. I guess this would be part of the "unexpected behaviour" category if we wouldn't treat it.

Reines 2010-05-29 19:13:27

  • Milestone changed from 1.4.0 to 1.4.1.

I'm going to change this ticket to 1.4.1 since it's really an enhancement, if you have time to do it before 1.4.0 then that's cool, but if not don't worry about it.

Franz 2010-06-01 13:10:44

From a usability point of view, would it not be better to simply just show an error message and not remove the inner-most quote?

Reines 2010-07-21 23:06:18

  • Milestone changed from 1.4.1 to 1.4.2.

Reines 2010-08-09 12:30:30

  • Milestone changed from 1.4.2 to 1.4.3.

Franz 2010-11-29 11:12:45

  • Summary changed from Quote limit needs fixed to Stripping empty BBCodes results in empty message error.

I created another pull request.
Please review this, somebody. There's also still room for improvement (see pull request).

quy 2010-11-30 18:19:16

How about "Posts cannot contain only empty BBCodes." only? As you have stated, this is a rare case. With the explanation, I didn't understand the issue without further researching it, and it will not be applicable if the quote BBCode is not used in the message.

Franz 2010-11-30 21:48:43

Exactly.
Go ahead and change that. I guess you can merge the pull request if nobody has any complaints (coding-wise).

quy 2010-11-30 22:12:09

Coding wise, it looks fine. Can you make the change and do the merge pull request since I am not sure how to do it?

Franz 2010-12-01 00:01:43

The instructions are right there at the bottom, beneath the pull request. Anyway, I'll do it tomorrow.

You wanted me to change the language string I added to "Posts cannot contain only empty BBCodes", right? I think that could cause confusion, as the original message they intended to post was not empty (when the innermost quote got removed).

quy 2010-12-01 00:28:00

On second thought, keep it the way you have it. If I am understanding this issue correctly, the likelihood of running into this issue will be slim to nothing.

quy 2010-12-01 00:32:37

When it does, it will be related to the quote BBCode.

Franz 2010-12-01 09:19:49

  • Status changed from open to fixed.

Ok, merged.

I hope the wording is still proper English.

Page (v1.5:caching) edited by Franz 2013-03-17 16:15:52

#812: Created cache page

Page (v1.4:caching) edited by Studio384 2013-03-17 18:53:50

#812: Copy Franz's cache page for 1.4

Page (v1.4) edited by Studio384 2013-03-17 18:54:14

#812: FIXME remove for Cache

Page (v1.5) edited by Studio384 2013-03-17 18:54:25

#812: FIXME remove for Cache