I get the following error(s) on any page with a buried comment.

* warning: preg_replace() [function.preg-replace]: Compilation failed: missing terminating ] for character class at offset 2 in /modules/comment_bury_promote/comment_bury_promote.module on line 411.
* warning: preg_replace() [function.preg-replace]: Compilation failed: missing terminating ] for character class at offset 2 in /modules/comment_bury_promote/comment_bury_promote.module on line 412.

This is only when I leave the disemvowelling field empty. But the disemvoweling only seems to work for the subject and not the body. I think this is because I'm using FCKEditor as my wysiwyg, and something is screwing up.

Comments

mercmobily’s picture

Hi,

Hummm interesting.
Are you ticking "disemvoweling" checkbox, though, and leaving the setting "Letters that will be killed in buried comments " empty? I don't think the module is meant to work like that -- you have to specify some letters if you turn it on!

Pleasel et me know :-D

Merc.

jazzdrive3’s picture

I have the box checked and then nothing in the disemvowel box, as per the instrucitons on the admin page itself that says to do that if you just want to delete the comment body. I only tried that because disemvoweling wasn't working at all. Nothing in a buried comment was changing. Only the subject changed. It seemed to work before I enabled a wysiwyg editor as default for users. Maybe the parser isn't working with

tags that are inserted? Not sure.

mercmobily’s picture

Hi,

Very strange.
OK, let's try this. What if you change:

   // Take the vowels out
   $vowels= variable_get('comment_bury_promote_disemvoweling_chars', 'aeiou');

   $comment->subject = preg_replace("/[$vowels]/",'',$comment->subject );
   $comment->comment = preg_replace("/[$vowels]/",'',$comment->comment );

Into:

     // Take the vowels out
      $vowels= variable_get('comment_bury_promote_disemvoweling_chars', 'aeiou');

      if($vowles == ''){
        $comment->subject = '';
        $comment->comment = '';
      } else {
        $comment->subject = preg_replace("/[$vowels]/",'',$comment->subject );
        $comment->comment = preg_replace("/[$vowels]/",'',$comment->comment );
      }

...? Does it work with this?

Merc.

jazzdrive3’s picture

That worked.

Thanks!

mercmobily’s picture

Status: Active » Fixed

Hi,

Excellent.
Keep the patch -- I've committed the code, so your updates will be in sync.

Merc.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.