HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

FormattingException: JSON could not be converted into quill operations

P3terP3ter New
edited January 2021 in Vanilla 3.x Help

Hello,

I have the error below with all posts of a specific user. This error seems to coming from the user's signature :

www.krocui.com - www.lucasdebruyn.com

The error log :

2021/01/25 19:33:39 [error] 23730#23730: *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.
 www.krocui.com - www.lucasdebruyn.com  in /srv/web/forum.pluxml.org/library/Vanilla/Formatting/Quill/Parser.php:160
Stack trace:
#0 /srv/web/forum.pluxml.org/library/Vanilla/Formatting/Formats/RichFormat.php(63): Vanilla\Formatting\Quill\Parser::jsonToOperations()
#1 /srv/web/forum.pluxml.org/library/Vanilla/Formatting/FormatService.php(34): Vanilla\Formatting\Formats\RichFormat->renderHTML()
#2 /srv/web/forum.pluxml.org/library/core/class.format.php(1456): Vanilla\Formatting\FormatService->renderHTML()
#3 /srv/web/forum.pluxml.org/library/core/class.format.php(1227): Gdn_Format::rich()
#4 /srv/web/forum.pluxml.org/plugins/Signatures/class.signatures.plugin.php(646): Gdn_Format::to()
#5 /srv/web/forum.pluxml.org/plugins/Signatures/class.signatures.plugin.php(530...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.
 www.krocui.com - www.lucasdebruyn.com  in /srv/web/forum.pluxml.org/library/Vanilla/Formatting/Quill/Parser.php:160
Stack trace:
#0 /srv/web/forum.pluxml.org/library/Vanilla/Formatting/Formats/RichFormat.php(63): Vanilla\Formatting\Quill\Parser::jsonToOperations()
#1 /srv/web/forum.pluxml.org/library/Vanilla/Formatting/FormatService.php(34): Vanilla\Formatting\Formats\RichFormat->renderHTML()
#2 /srv/web/forum.pluxml.org/library/core/class.format.php(1456): Vanilla\Formatting\FormatService->renderHTML()
#3 /srv/web/forum.pluxml.org/library/core/class.format.php(1227): Gdn_Format::rich()
#4 /srv/web/forum.pluxml.org/plugins/Signatures/class.signatures.plugin.php(646): Gdn_Format::to()
#5 /srv/web/forum.pluxml.org/p

An example here ("There was an error rendering this rich post") : https://forum.pluxml.org/discussion/comment/61557/#Comment_61557

The rich editor is disabled at the moment. Vanilla 3.3, PHP7.4, Nginx.

Need some help here 😅

Comments

  • K17K17 ✭✭✭

    Ahah c'est parce que RichEditor est un peu buggé, et que le rendu "Rich" n'est aps supporté quand RichEditor est désactivé. Il faudrait vider sa signature dans la base de données pour qu'il puisse l'éditer a nouveau je pense, si tu ne peux pas activer RichEditor.

    (in english for non-french people: It('s because RichEditor have bugs, and that Rich rendering isn't working when RichEditor is disabled. You may have to empty his signature in the database to let the user edit his signature if you can't enabled RichEditor)

  • The code first renders the post body with its format and after that the signature is inserted. It shouldn't be rendered like that.

    I would do those steps:

    1. Purge the users signature from I guess UserMeta. Check how his posts look like.
    2. Set a simple signature for him: "Hello World"? Check the result
    3. Change "Hello World" to www.whatever.org. Check.
    4. Manually type in his previous signature. Check.
    5. If that doesn't work, try the most recent Signature version: https://github.com/vanilla/vanilla/tree/release/4.0/plugins/Signatures


  • Hi, thanks for your help and sorry for this late answer.

    I try to delete directy the user signature from de database, and just add "test" as a signature, but got the same issue.

    I also try the last addon version (I was on 1.6.1, and now on 1.7), but it doesn't fixed the problem.

Sign In or Register to comment.