Patch for a Critical Bug in Version 3.5.6

A rather serious bug was brought to my attention a couple of hours back, that would prevent users from posting comments (I had been wondering why I had received no comments yet on my last announcement!). This bug was causing the ill-famed “white screen of death” whenever users tried to post comments. I took quick steps to resolve this and I have provided the patch at two places:

  1. The original post reporting this on support forum.
  2. At the WordPress forum itself.

And for good measure I am reiterating the fix here:

  1. Open the file comments.php.
  2. Look for this block of code near the top:
    
           global $suffusion_unified_options, $post;
           foreach ($suffusion_unified_options as $id => $value) {
              $$id = $value;
           }
    
  3. Either delete it or comment it out.
  4. Use this code instead:
    
           global $options, $suffusion_options, $post;
           foreach ($options as $value) {
              if (isset($value['id']) && isset($value['std'])) {
                 if (!isset($suffusion_options[$value['id']])) {
                    $$value['id'] = $value['std'];
                 }
                 else {
                    $$value['id'] = $suffusion_options[$value['id']];
                 }
              }
           }
    
  5. Save and you should be fine.

I have already submitted version 3.5.7 to address this, but given that 3.5.6 took such a long time to get approved I wanted to provide this code to users upfront.

One Response to “Patch for a Critical Bug in Version 3.5.6”

  1. It appears that the bugs that you mentioned here broke IntenseDebate’s interaction with the site as well. The update appears to have fixed everything. Thank you!

    I’ve posted info on it here as an FYI for any users that might be troubleshooting:
    http://mikebeach.org/2010/07/an-answer-for-the-issues-surrounding-intensedebate-and-suffusion/

    I’ve included kudos for you on the great work you’ve done in Suffusion! Please keep up the good work!