PDA

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



Wulf
25-08-11, 16:14
This was reported earlier here but a new thread seems to be in order:
http://www.vbenterprisetranslator.com/forum/vbet4-feature-requests/2208-cms-articles-not-translating-2.html

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

kamilkurczak
26-08-11, 09: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.

Wulf
26-08-11, 16: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.

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

vBET
29-08-11, 22: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.

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

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

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Languages translations delivered by vBET PRODUCER_PRODUCT_VERSION