Skip to main content
Nested quoting depth ignored on 1.1.9 Started by radu81 · · Read 11971 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Nested quoting depth ignored on 1.1.9

On my forum I always had the option "Allowed nested quoting depth" set to "1", and I notice that this option is ignored now. If I do a quote of a message which contains a quote I got double quote.
sorry for my bad english

Re: Nested quoting depth ignored on 1.1.9

Reply #1

Same on my test forum, Radu.

And on the upgraded forum an error will happen, when I try to quote a post again, which already contains one "double quote". None of them is shown in the preview and if I don't type something then, error will say of course: "empty text field".
Last Edit: April 14, 2023, 01:44:51 pm by Ruth

Re: Nested quoting depth ignored on 1.1.9

Reply #2

Yeah ... that is interesting.  Things are getting confused as the message being quoted is first "stripped" then what remains is quoted.  I thought it quoted and then did the strip  :embarrassed:

If you have time, try doing the following.  In Subs.php in the function removeNestedQuotes add one line and see if that fixes the problem.

Code: (find) [Select]
	// Remove just -some- of the quotes, then we need to find them all
Code: (replace) [Select]
	// Remove just -some- of the quotes, then we need to find them all
$max_depth--;

Re: Nested quoting depth ignored on 1.1.9

Reply #3

I tried this one...

If I quote a post with a quote in it, i will get an empty quote...

Re: Nested quoting depth ignored on 1.1.9

Reply #4

What value do you have set for quote depth in the ACP ?

Re: Nested quoting depth ignored on 1.1.9

Reply #5

1 at the moment on test forum...shall I change it?

Re: Nested quoting depth ignored on 1.1.9

Reply #6

You can leave it like that, I'm just trying to duplicate the error and I think I have .... now to fix it  :undecided:

Re: Nested quoting depth ignored on 1.1.9

Reply #7

This is a bit confusing, but let me try to explain.  Note I even confused myself, the previous "fix" should not be used.

  • In 1.1.8 you either allowed or not, nested quotes.  It was simply yes or no.
  • In 1.1.9 this changed to a value.  0 is intended to not allow any nested quotes (same as checking "Remove nested quotes when quoting" in 1.1.8) and any positive number will allow that many nested quotes inside of your quote.

Ruth, the issue you reported is working as expected.  You had a message that was only a quote, nothing more.  Quoting that but not allowing nested quotes means the quote is stripped and there is nothing left to quote. (my "fix" made that worse)

Lets try some examples, here is a topic thread.
Code: (pseudo) [Select]
1) message

2) <quote>message</quote>
first response

3) <quote><quote>message</quote>first response</quote>
second response

4) <quote><quote><quote>message</quote>first response</quote>second response</quote>
third response


Setting Allowed nested quoting depth to zero means all quotes are removed and only the text added by the quoted message will be used.  You are quoting just the text of the reply.
Examples

quoting number 4 above would give:
Code: [Select]
<quote>third response</quote>
your response here

quote number 2 would give
Code: [Select]
<quote>first response</quote>
your response here

Setting Allowed nested quoting depth to 1, a single quote nested inside of your quote (the outer most) will remain
Examples

quoting number 4 above would give:
Code: [Select]
<quote>
<quote=1st nested quote>second response</quote>
third response
</quote>
your response here

quoting number 2 would give
Code: [Select]
<quote>
<quote=1st nested quote>message</quote>
first response
</quote>
your response here

Setting Allowed nested quoting depth to 2, two nested quotes inside of your quote, are allowed
Example

quoting number 4 above would give:
Code: [Select]
<quote>
<quote=1st nested quote>
<quote=2nd nested quote>first response</quote>
second response
</quote>
third response
</quote>
Your response here

In working on this there is an inherited issue when removing nested quotes on a message that had nested quotes.  An example is a message with several quotes like this <quote><quote>message</quote>first quote</quote>second quote would become <quote>message first quote second quote</quote> So indeed it strips all the quotes, but jumbles the text of the various quotes into one.

One primary reasons for changing to a depth level was to allow for a quote in a post, so for example a message like
Code: [Select]
I would like to quote someone who said <quote>spuds is mental</quote> and agree with them
... if you do not allow nested quotes, this becomes
Code: [Select]
<quote>I would like to quote someone who said and agree with them</quote>
when quoted and that breaks the flow.  In 2.0 I've considered adding some indicator that the text was quoted using the quote button vs the editor quote button so the system could be more intelligent about what its removing.  That said it is already rather confusing.

 

Re: Nested quoting depth ignored on 1.1.9

Reply #8

Quote from: Spuds –
  • In 1.1.8 you either allowed or not, nested quotes.  It was simply yes or no.
TBH, I don't remember how this was set up, I didn't touch that option for years.
Quote from: Spuds –
  • In 1.1.9 this changed to a value.  0 is intended to not allow any nested quotes (same as checking "Remove nested quotes when quoting" in 1.1.8) and any positive number will allow that many nested quotes inside of your quote.
After updating from 1.1.8 to 1.1.9 I started to see nested quotes on my forum, but like I said since I did not touch that setting in the last years I thought it was a bug.
Switching to "0" solves the problem, thanks for your explanation @Spuds and thanks @Ruth for doing those tests.
sorry for my bad english

Re: Nested quoting depth ignored on 1.1.9

Reply #9

Quote from: radu81 – TBH, I don't remember how this was set up, I didn't touch that option for years.
This was really an oversite on my part, I did not account for the change during the upgrade. 

Basically if you had the option checked in 1.1.8, then the option was "on", and quotes were removed.  A checkbox "on" value is stored in the DB as a 1.  So in 1.1.9 it sees the value as 1 and then allows one nested quote. 

During the upgrade I should have checked if the value was "on" and then set it  0, and if it was "off" (0) set it to 1 or 2 allowed .... To late to close the fence now  :zipper_mouth: