HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
JSON could not be converted into quill operations (ver3.3)
TerminalAddict
New
Could be related to https://open.vanillaforums.com/discussion/38472/non-unique-ids-in-rich-editor-vanilla-3-3
JSON could not be converted into quill operations
2020/11/26 23:36:51 [error] 20659#20659: *1 FastCGI sent in stderr: "PHP message: PHP Warning: Bad input encountered|Vanilla\Formatting\Formats\RichFormat|Vanilla\Formatting\Formats\RichFormat::logBadInput|Vanilla\Formatting\Exception\FormattingException: JSON could not be converted into quill operations. [{\"insert\":\"this\\n\"}] in /var/www/html/domain.com/vanilla/library/Vanilla/Formatting/Quill/Parser.php:160 Stack trace: #0 /var/www/html/domain.com/vanilla/library/Vanilla/Formatting/Formats/RichFormat.php(82): Vanilla\Formatting\Quill\Parser::jsonToOperations('[{\\"insert\\":\\"...') #1 /var/www/html/domain.com/vanilla/library/Vanilla/Formatting/FormatService.php(80): Vanilla\Formatting\Formats\RichFormat->renderPlainText('[{\\"insert\\":\\"...') #2 /var/www/html/domain.com/vanilla/library/core/functions.validation.php(606): Vanilla\Formatting\FormatService->renderPlainText('[{\\"insert\\":\\"...', 'Rich') #3 /var/www/html/domain.com/vanilla/library/core/class.validati" while reading response header from upstream, client: 103.123.164.20, server: hosting.netenterprises.co.nz, request: "POST /domain.com/vanilla/post/discussion/general HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "hosting.netenterprises.co.nz", referrer: "https://hosting.netenterprises.co.nz/domain.com/vanilla/post/discussion/general"
I note the malformed JSON
[{\"insert\":\"this\\n\"}]
Also of interesting note, I have two identical vanilla installed, 1 is in the root of the domain (i.e http://example.com) and the other in in a sub directory (http://dev.example.com/domain.com/vanilla)
I don't have these problems in the vanilla in the root, only in a sub directory
0
Comments
Discussions and Comments have a special "Format" and everytime the format is "Rich", Vanilla tries to render it with the Rich Editor. But if the format is in fact a "normal" BBCode, MarkDown, HTML or text or anything but not Rich, you get that error
um ..... still doesn't solve the problem though.
When do you see that error? When you create a new discussion, when you try to write a comment to one discussion or to every discussion?
The problem are existing entries in the database where the content is no json, but the rich editor tries to handle them. Could be in Discussion, Comment, Draft table
Draft table is empty.
Problem exists when I try to star ta new discussion, or try comment on a previous discussion (I had one successful post using wysiwyg, but now cannot edit, or comment)
Slightly related .. I though "fine, I'll use the wysiwyg editor", but that has problems with uploads