Please upgrade here. These earlier versions are no longer being updated and have security issues.

Warning message "There was an error rendering this rich post."

brainolutionbrainolution ✭✭
edited March 6 in Vanilla 2.0 - 2.8

I just upgraded to v2.8 from 2.6.x and switched to PHP 7.3 from 7.0.

Everything looks good except for a warning message "There was an error rendering this rich post." This message is appearing below most existing posts on the forum. I'm using Bootstrap theme. I get it even when I switch to the new Keystone theme.

I can see the same issue on some posts on this forum too, for example:

https://open.vanillaforums.com/discussion/16200/vanilla-2-0-18-beta-2-is-now-available/p4

What do I need to do to fix this issue?

Thanks!

Comments

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator
  • charrondevcharrondev Application Developer (PHP, JS) Montreal Vanilla Staff
    edited March 6

    I would caution that we're currently in the process of updating to be compatible with PHP 7.3. We just recently added it to our CI environment and some of our tests our failing.

    We're planning on upgrading the team's local environments to PHP 7.3 but had been waiting for XDebug to to have it's final release come out for PHP 7.3.

    The XDebug 2.7 release (which is the first release to support PHP 7.3) literally just came out today though, so it will probably be a few weeks before we've tracked everything down.


  • I went through that thread but it does not specifically mention the error that I'm getting, and I'm not able to figure out what exactly do I need to do to get around the issue. Can you explain what I should do to get around this issue?

    I'm using the new rich text editor.

    Thanks!

  • @charrondev Thanks for the heads up. I've changed the PHP version to 7.1.

  • charrondevcharrondev Application Developer (PHP, JS) Montreal Vanilla Staff

    This issue normally happens with some corrupted entries in the database. We encountered some issues ourselves with some fo the new configuration defaults on our own infrastructure and are taking a new approach.

    In the meantime I'd recommend going to the /vanilla/settings/posting page and making sure the format you have enabled on mobile and desktop match the editors you have enabled. We noticed an issue where users that didn't have mobile editor set, would suddenly have rich editor set as the mobile editor even though the editor was not enabled. The posts would then get inserted in the database labeled as Rich even though they weren't. This would cause the issues you are seeing. Unfortunately the fix is rather manual, but I'll be releasing 2.8.1 tomorrow withs some fresh release notes and some information about how to move forward.

  • charrondevcharrondev Application Developer (PHP, JS) Montreal Vanilla Staff

    @brainolution Did rolling back the PHP version fix anything? I'd imagine it didn't here. My advice was more about the untested nature of it at the moment. We run PHP 7.2 on our own infrastructure if your looking for the most tested version for Vanilla.

  • @charrondev Both formats are set to Rich, which matches the editor format.

    On the PHP version, yes I understand that it is not related to this issue. It didn't fix the issue.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    @brainolution

    I got this error when I was testing 2.8, and switched editors.

    Make sure you have these lines in your config.php

    $Configuration['Garden']['InputFormatter'] = 'Rich'; //Html, Markdown
    $Configuration['Garden']['MobileInputFormatter'] = 'Rich'; //Html, Markdown
    


  • @whu606 These lines already exist in my config.php:


  • whu606whu606 I'm not a SuperHero; I just like wearing tights... Moderator

    OK.

    It was what worked when I got that error, but obviously yours is caused by something else.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    You say it appears below existing posts? To my understanding that would mean that posts made before you have used the rich editor are now rendered with the rich editor, which will certainly fail. Is that correct?

    Can you take a look at the database and search for one of that old comments in GDN_Comment and take a look at the "Format" column? It should not be "Rich", since that format would only be used for comments created with the Rich Editor.


  • brainolutionbrainolution ✭✭
    edited March 8

    @R_J You are right.

    All those comments have the Format set as "Markdown" in the database.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Can you provide a screenshot or a link?

    Are those markdown posts rendered properly?


  • Please refer to the screenshot below. The posts seem to be rendering just fine. But there's a warning message at the bottom.

    And not every post has this problem. Roughly 50% of the posts have the problem.



  • charrondevcharrondev Application Developer (PHP, JS) Montreal Vanilla Staff

    @brainolution Are you sure that isn't a user's signature?

    sock
  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    What a mean idea that would be?! 😂


    I'm a little bit jealous I never thought of putting an error message in my signature somewhere...


  • Hahaha .. certainly not. For now, I have reverted back to using my previous editor, changed the post settings to "Markdown" and the error has disappeared.

    I really wanted to use the new Rich editor and if you have other suggestions, I'll be happy to try them to make it work.

  • charrondevcharrondev Application Developer (PHP, JS) Montreal Vanilla Staff

    What I mean is, is the error part of a user's signature. I'm trying to understand why there is a separator between the post contents and the error. I was thinking the error might have been caused by a user making a signature while the posting setting were "in limbo" so to say.

    It's definitely possible to manually make a post that will display that for the rich editor though (by modifying parts of the request to server).

Sign In or Register to comment.