Tag Archive | "errors"

Tags: , , , , , , , , , ,

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

Posted on 01 June 2009 by admin

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

Comments (5)

Like the content?
Donate a few bucks!

Categories

Friend's Projects