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.
BBCode input formatter does nothing
Bilge
New
If I add the following to my configuration: $Configuration['Garden']['InputFormatter'] = 'BBCode';
and create a new post containing [b]bold[/b]
then it will show up, verbatim, as "[b]bold[/b]" in the post body.
0
This discussion has been closed.
Comments
Is there "BBCode" in column "Format" of table GDN_Discsussion/GDN_Comment in your database?
What version of Vanilla are you using (look at /index.php)?
Have you tried it with all plugins deactivated?
Yes
2.0.18.10
Yes
You're the one who cannot enable themes, right?
If BBCode is not working although it should (from your answers there is no reason why it should not!) and you have also other problems with standard Vanilla that no one else has, I would assume that your installation is incomplete or buggy. I suggest you back up what you have and just copy a fresh download of Vanilla to your server.
I can copy the files as many times as you like but it doesn't change anything. The same problems occur with every deployment.
you could try a different server host or make a local installation on your home pc, and see if you run into the same problems.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
By the way, when you do a fresh installation, isn't the "Vanilla" application supposed to be enabled by default? Both times I've tried to deploy this software I had to enable it manually. Since I'd never used this software before it was the source of much frustration when trying to figure out why visiting root gave a "page not found" error.
yes you are correct. the application should be enabled automatically. A few people other people have had the same problem with config not being written to properly during install. Something with the config.php not being able to be written to for some unknown reason. It would be nice to know what the common factor is that results in this. php version, os version, server host, permission and ownership settings applied by host, etc.
We need to tie those other discussions together to see if there is one common reason.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Ubuntu 12.04.4 LTS
PHP 5.5.8
Apache/2.4.6
There are no "settings applied by the host". I have a dedicated server. All software and settings are my own and all software works perfectly except Vanilla.
with respect to installation problems.
try php 5.3 or 5.4 if you can, just for grins.
and install nginx and see if it gives you different results.
also you can use version check plugin http://vanillaforums.org/addon/versioncheck-plugin to see who the web process owner is and make sure all files and folders have that ownership.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Could you save the code below as file
/plugins/ET/class.et.plugin.php
and activate the plugin "et" in the dashboard? You have a problem with your config, I think, so you might have to add$Configuration['EnabledPlugins']['ET'] = TRUE;
to your config.php manually in order to enable it.The plugin will add some lines of information above each comment. Would you mind sharing that information with us? It might be helpful to find the error.
DEBUG: Reading content of config.php: BBCode
DEBUG: Using config cache?
DEBUG: Resetting config caching...
DEBUG: Reading content of config.php again: BBCode
DEBUG: Value of InputFormatter in config-defaults.php: Html
DEBUG: Value of InputFormatter after reading config.php: BBCode
DEBUG: Manually calling format function: [s]strike through[/s]
DEBUG: /home/www/boontex.com/wow/discuss/conf/config-defaults.php exists? 1
DEBUG: /home/www/boontex.com/wow/discuss/conf/config.php exists? 1
DEBUG: Comment format: BBCode
[b]bold[/b]
Does this issue apply to the theme problem as well? Would you disable OPcache in the PHP configuration and see if doing so fixes the problems? Please be sure to verify that changes to the PHP configuration take place after a restart of the web server.
Add Pages to Vanilla with the Basic Pages app
Why would touching the OPcache accomplish anything? It's a cache of OP codes, not pages.
OPcache like APC does cache scripts, like APC you can set it up so it doesn't automatically clear the cache, e.g.
apc.stat = 0
.If you are having trouble with persistence, or any setting not being applied straight away it would be natural to assume, that it has something to do with caching.
grep is your friend.
Well, everything looks great, except for the output of the function that should give you formatted bbcode...
I have no clue and would try to drill down into that "broken" function in order to see what is not working.
The function that outputs formatted text is in
/library/core/class.format.php
. Could you adddecho($Formatter);
afterin order to see if it outputs 'BBCode' correctly?
If it does, it should call the function BBCode. In order to check that, please add a
decho(__LINE__);
before eachreturn something
in the function BBCode() in order to see where it escapes the function without applying the bbcode formattingopcache.revalidate_freq
/opcache.validate_timestamps
are most likely the reason why your setting aren't being detected immediately.The isn't necessarily a problem though, where the production environment is set up how you like.
Also caching where it is used effectively, is based on knowledge of what you want out of it. There is no caching solution that is just turn it on and forget about it, of course people do that, but that doesn't mean they are using it effectively.
grep is your friend.
I understand that the OPcache could be the cause of not seeing changes applied to the settings immediately, since the settings are PHP code, but I do not see how it could solve the BBCode problem.
I inserted
die('dead');
at the top of theAuto
function but it was not called.Auto()
is never called.If I enable the ET plugin, it outputs:
DEBUG: BBCode
once per comment, immediately before the lineDEBUG: Manually calling format function: [s]strike through[/s]
.It is called, that script can be cached. It is illegal in php to have the same class name. so unless you are mysteriously overriding the autoloading, it must be called.
However it depends on the context. In discussions
Gdn_Format::To()
is used becuase the format is determined by the Column.grep is your friend.
Note this line in
Gdn_Format::BBCode()
Have you removed the HtmLawed plugin? That plugin is needed even if you a re not using it as your formatter. it doesn't need to be enabled. It is used in general sanitation.
That would be my first guess. Also check the view permissions.
grep is your friend.