System wide configuration does turn off feature

Hello,

So I want to remove the quoting of selected text when replying. For example if I select text content from one comment and then reply to another it will quote the selected text inline when clicking the reply button.

I found two ways of turning this feature off, one of which turning it of from the system wide configuration, called QuoteSelectedText. See screenshot below:
image (5)

And it did actually take effect and was turned off:

However nothing changed, but it should be, proof it should had taken effect:

Could someone explain to me why it did not take effect?

Did you flush your Mason cache?

Hi i found out this is a bug.

When you change the system wide configuration, its value become saved in the database and it has a value of: 0 or 1 with string type as shown in my previous screenshots.

The first statement in the jquery function for quoteselection.js wont even work when this feature gets toggled. The reason for that is the ! operator wont see a string with value 0 as a false case, so it will always be true and bypass that statement, regardless of toggling the feature on or off in your system wide config from th UI. In order to fix that, i just changed the statement to RT.Config.QuoteSelectedText === "0" instead of !RT.Config.QuoteSelectedText in the quoteselection.jsx file

The reason for this operator to not see it as a false case is for the fact that this operator reverses zero value cases, and a string is only a zero value when it is β€œβ€ and not β€œ0” or β€œ1”. This would only be correct in case of a bool, but it’s clearly a string type as shown in my previous screenshots

Which after i cleared my mason cache, restarted the docker container and cleared my browser state, its working now!

And be sure on toggles on this system wide configuration to always clear site cache, as the script can be cached by the browser or DNS based CDNs

Please note
This is tested only on rt5’s official docker image

1 Like