View Full Version : Solved Can not post comments on CMS articles

25-08-11, 15:14
This was reported earlier here but a new thread seems to be in order:

I am having this problem again where it doesn't allow to post comments to CMS articles. In the Firefox error console, it shows this message when trying to leave a comment:

document.getElementById("vbet_addbbcodes") is null

26-08-11, 08:45
At this moment it is not supported. We will work to support [ lang] also for CMS articles. I suppose there was some issue before and we left it as not needed, but I will check it again and see what happens there.
MichaƂ (vBET) is on holiday now and he will be in Monday. I will try to find a solution for you.

P.S. I just tested CMS article with lang BBCode added manually and it translates fine. Please make test article with lang and langtitle BBCode added manually and check how it behaves. Maybe when you changed already existing article it was taken from vBulletin cache and changes was not recognized.

26-08-11, 15:31
This is not about translating CMS articles. Comments on CMS articles can not be posted at all, even when they are in our site default language.

29-08-11, 08:14
can you paste here any url to this page when I can test it?

29-08-11, 21:03
Ok I had to check it several times but I was able to reproduce. This is vBET bug. If user has set his default language other than forum language, then vBET adds additional option for editor. Here we forgot to check this condition and we always add some Java Script even if option was not added - this is the cause of the issue.

For quick fix please:
1. Go to Admin CP -> Plugins & Products -> Plugin Manager
2. Find plugin named: Handle default language for CMS article comments
3. Edit it - find:

$view->comment_block = str_replace('if (comment_postid > 0)', 'if (document.getElementById(\'vbet_addbbcodes\').checked) {
4. Replace by:

$view->comment_block = str_replace('if (comment_postid > 0)', 'if (document.getElementById(\'vbet_addbbcodes\') && document.getElementById(\'vbet_addbbcodes\').checked) {

This is tested and will be included in next release. Please confirm that it help.

30-08-11, 03:42
That fix worked great and can now comment on CMS articles again. Great job in finding this problem!

30-08-11, 09:45
We were happy to help You, for any other issue you are more than welcome to ask. :)

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations delivered by vBET 4.9.99