Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Forum wont parse HTML, BBC, or Markdown

I am running a forum that is acting strange.
It is set for input of HTML yet wont parse it. Just shows all the html code in posts.
If set it to BBC, it shows the bbc codes, and wont parse it, either.
Same with Markdown. I've tried all 3 in config.php and none will work.

Also, when enable plugins, have to right click the Enable button, and choose Open in new Tab for it to work.
These are issues that caused us to do fresh install before, and now after working fine for couple months, they are returning.

Any ideas on what is going on? Vanilla Version: 2.0.18.8

Best Answer

  • peregrineperegrine MVP
    Answer ✓

    also make sure you have htmlawed plugin installed correctly, working and enabled

    and post an example of a screenshot after you install the plugin.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Answers

  • Take a look in the Gdn_discussions and comments tables, value for 'format' column is ...

    There was an error rendering this rich post.

  • peregrineperegrine MVP
    edited September 2013

    These are issues that caused us to do fresh install before, and now after working fine for couple months, they are returning.

    did you do anything new between the time it was working correctly and when the errors started occuring? (theme changes, js changes, php changes, addon changes, config.php changes, editor changes)?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine: No changes...

    As for the database, I don't have access to phpmyadmin on that site.
    But, as said, it was working fine for a while, then started acting up again, UnderDog

  • peregrineperegrine MVP
    edited September 2013

    you are right - if no changes - the format working and then not is pretty odd!

    problems like formatting working and then mysteriously not working usually don't just happen in a vacuum.

    You are using buttonbar editor or which editor ????

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • As for the database, I don't have access to phpmyadmin on that site.

    You could write a little script to show you the format columns in discusssions and comments, if you don't have access to phpmyadmin.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Standard editor...
    Wonder if the server could be the issue...
    Think about it... The same issues had before, now having again. That and the issue with needing to open in new tab when enable plugins, does not sound right. I think the sits is on it's own VPS account.

  • How about a fresh install? Did you convert from another script? We need to know the values of those columns. What are the current editor (markdown?) Config settings that you have? Paste them in between 3 tilde ~~~ tags please

    There was an error rendering this rich post.

  • If you have vps you should be able to access the database, contact your host. They just might not use phpmyadmin.

    grep is your friend.

  • edited September 2013

    @UnderDog: This was a fresh install.

    @x00: It's not my site, I only run it for them. I only have FTP access.

    @peregrine: How do I write that script?

  • Add this plugin to your /plugins/FormatTester

    change your name to your screenname in the plugin

    /plugins/FormatTester/default.php

    <?php if (!defined('APPLICATION')) exit();
    
    
    // Define the plugin:
    $PluginInfo['FormatTester'] = array(
       'Name' => 'FormatTester',
       'Description' => ' my format tester',
       'Version' => '1',
       'Author' => "Peregrine",
    );
    
    class TesterPlugin extends Gdn_Plugin {
    
    
    
      public function DiscussionController_AfterCommentMeta_Handler($Sender) {
          //Put you screen name in the following statement and only you will see info
    
          $NAME = "BurkeNight";
    
          // --------------------------------------
    
           $Session = Gdn::Session();
    
          if ($Session->User->Name == $NAME) {
          $format = $Sender->EventArguments['Discussion']->Format;
           $Formatter = C('Garden.InputFormatter', 'Html');
            echo "config Format is $Formatter <br />";
            $cformat = $Sender->EventArguments['Comment']->Format;
            $dformat = $Sender->EventArguments['Discussion']->Format;
            if (!$cformat) 
           echo "this discussion is format - $dformat in discussion table<br />"; 
           if ($cformat) 
           echo "this comment is $cformat in comment table";
         }        
      }
    
    
       public function Setup() {
       }
    
    }
    

    enable the plugin and you will see all formats (config, comment and discussion) when viewing individual discussions.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited September 2013

    if you have ftp access - you can easily do above by adding plugin directory and plugin

    and if you don't have admin privs you can enable plugin in config.php

    $Configuration['EnabledPlugins']['FormatTester'] = TRUE;

    The above was a gift - usually I do this only for people who have donated for previous plugins.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited September 2013

    also note:

    $Configuration['Garden']['InputFormatter'] = 'Markdown'; // Html, BBCode, Markdown, Text 
    
    $Configuration['Garden']['InputFormatter']                      = 'Html';  //not HTML , not html
    
    $Configuration['Garden']['InputFormatter']                      = 'Markdown' ; // not MARKDOWN  not markdown
    

    The format in the config statement ONLY applies to new discussions and comments that are added and the format in the config is added to each discussion and comment on creation.

    The format in the DISCUSSION AND COMMENT TABLES reflects what format is currently used for the discussion and comment.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    Answer ✓

    also make sure you have htmlawed plugin installed correctly, working and enabled

    and post an example of a screenshot after you install the plugin.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • We have htmlawed in plugin folder, yet it does not show on the list.
    I ended up fixing that issue by adding it into config manually, like you said to do with the other part.
    Thank you very much for the help. :)

Sign In or Register to comment.