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)

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

Tagged:

Comments

  • R_JR_J Ex-Fanboy Munich Moderator


    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.


    grep InputFormatter conf/config*
    conf/config-defaults.php:$Configuration['Garden']['InputFormatter'] = 'Rich'; // Html, BBCode, Markdown, Text, Rich
    conf/config-defaults.php:$Configuration['Garden']['MobileInputFormatter'] = 'Rich';
    conf/config.php:$Configuration['Garden']['InputFormatter'] = 'Rich';
    conf/config.php:$Configuration['Garden']['MobileInputFormatter'] = 'Rich';
    


  • R_JR_J Ex-Fanboy Munich Moderator

    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?


  • R_JR_J Ex-Fanboy Munich Moderator

    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

Sign In or Register to comment.