4 Kudos

No attachments or Registration Captcha image in SMF after upgrade to 2.0 RC1

smf

Problem/Symptom:

No attachments in Simple Machines (SMF) 2.0 RC1 after upgrade. No captcha images in the registration area of SMF 2.0 RC1 after recently upgrading.

Solution:

Find and replace the code snippets below..

Find:

// Walk the right path.      if (!empty($modSettings['currentAttachmentUploadDir']))
{
if (!is_array($modSettings['attachmentUploadDir']))
$modSettings['attachmentUploadDir'] = unserialize($modSettings['attachmentUploadDir']);
$path = $modSettings['attachmentUploadDir'][$dir];
}
else
$path = $modSettings['attachmentUploadDir'];

Replace with:

// Walk the right path.
if (!empty($modSettings['currentAttachmentUploadDir']))
{
if (!is_array($modSettings['attachmentUploadDir']))
$modSettings['attachmentUploadDir'] = unserialize($modSettings['attachmentUploadDir']);
$path = $modSettings['attachmentUploadDir'][$modSettings['currentAttachmentUploadDir']];
}
else
$path = $modSettings['attachmentUploadDir'];

My Personal Experience:
After recently upgrading my 1.1.6 version of SMF to 1.1.9 and having issues with that upgrade, I decided to just go ahead and upgrade to 2.0 RC1 since I’ve been running it on several forums with great success. After a successful upgrade, I tried testing the registration process and the captcha images were not showing. A few minutes later I tried a test post with an attachment and the result was a blank page. I posted another test post without an image and tried modifying it afterward and loading an attachment. That resulted in another blank page. After searching around, I found this code snippet that cured both issues.

Solution referenced from:
http://www.simplemachines.org/community/index.php?topic=312047.msg2073091#msg2073091

  • Share/Save/Bookmark
Sponsors
Sponsors
About the Author

4 Kudos
cha2e
Blog: Chase
Top Entertainment Articles
Zimbio Caption Contest: Enter and Win $25 at Amazon.com!
This is possibly the easiest photo to caption. It practically writes itself.
Twilight’s Christian Serratos Gets Naked For PETA
Serratos poses naked for the 'I'd Rather Go Naked Than Wear Fur' campaign.
100 Best Bikini Bodies
Click here for the best way to spend 10 minutes.
More From Zimbio
Copyright © 2009 - Zimbio, Inc. Some rights reserved.