I am not using DruBB itself on my site, but I used parts of it. One bit that I used is:

// Add identifier that can be used in css to target forum posts.
$form['#prefix'] = '<div class="forum">';
$form['#suffix'] = '</div>';

I've discovered that bit of code on my site breaks previewing. Probably because it's overwriting this from node.pages.inc:

  if (isset($form_state['node_preview'])) {
    $form['#prefix'] = $form_state['node_preview'];
  }

Since I'm not using DruBB as is, it's possible something else in DruBB prevents this problem but I didn't see anything on scanning through the code. It would be good if someone using DruBB could check if preview is working for them on forum nodes.

Michelle

Comments

merlinofchaos’s picture

Category: task » bug

Hmm. Ok, while comment previews are working but a little odd looking, forum node previews are totally broken on my drubb install. :/

tom_o_t’s picture

Same here

michelle’s picture

FWIW, I just did this and it seems to be working on my site (again, though, not using the actual DruBB module):

  // Add identifier that can be used in CSS to target post forms.
  // Make sure it's empty first, to avoid clobbering the preview prefix.
  if (empty($form['#prefix'])) {
    $form['#prefix'] = '<div class="post-form">';
    $form['#suffix'] = '</div>';
  }

Michelle

eidolon night’s picture

Using the latest DruBB #3 worked for me as well.

michelle’s picture

Wow, someone is actually using DruBB? That's like a blast from the past. :)

Michelle