MyBB Community Forums

Full Version: Can't access profiles, forums, or threads after upgrade
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I upgraded a forum I run to version 1.8.6 today. Upgrade worked fine, everything looks good. However, whenever I try to open a profile, a forum, or a thread I get the following error:

Not Found
The requested URL /user-9.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

The database doesn't have the normal table prefix, however the correct prefix is located in the /inc/config.php file in the forum directory.

Any idea what could be causing the error?

I think I found what the issue is. Flipping through /inc/init.php and found the following block of code.

/* URL Definitions */
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && isset($_SERVER['SEO_SUPPORT']) && $_SERVER['SEO_SUPPORT'] == 1))
{
$mybb->seo_support = true;

define('FORUM_URL', "forum-{fid}.html");
define('FORUM_URL_PAGED', "forum-{fid}-page-{page}.html");
define('THREAD_URL', "thread-{tid}.html");
define('THREAD_URL_PAGED', "thread-{tid}-page-{page}.html");
define('THREAD_URL_ACTION', 'thread-{tid}-{action}.html');
define('THREAD_URL_POST', 'thread-{tid}-post-{pid}.html');
define('POST_URL', "post-{pid}.html");
define('PROFILE_URL', "user-{uid}.html");
define('ANNOUNCEMENT_URL', "announcement-{aid}.html");
define('CALENDAR_URL', "calendar-{calendar}.html");
define('CALENDAR_URL_MONTH', 'calendar-{calendar}-year-{year}-month-{month}.html');
define('CALENDAR_URL_DAY', 'calendar-{calendar}-year-{year}-month-{month}-day-{day}.html');
define('CALENDAR_URL_WEEK', 'calendar-{calendar}-week-{week}.html');
define('EVENT_URL', "event-{eid}.html");
}
else
{
define('FORUM_URL', "forumdisplay.php?fid={fid}");
define('FORUM_URL_PAGED', "forumdisplay.php?fid={fid}&page={page}");
define('THREAD_URL', "showthread.php?tid={tid}");
define('THREAD_URL_PAGED', "showthread.php?tid={tid}&page={page}");
define('THREAD_URL_ACTION', 'showthread.php?tid={tid}&action={action}');
define('THREAD_URL_POST', 'showthread.php?tid={tid}&pid={pid}');
define('POST_URL', "showthread.php?pid={pid}");
define('PROFILE_URL', "member.php?action=profile&uid={uid}");
define('ANNOUNCEMENT_URL', "announcements.php?aid={aid}");
define('CALENDAR_URL', "calendar.php?calendar={calendar}");
define('CALENDAR_URL_MONTH', "calendar.php?calendar={calendar}&year={year}&month={month}");
define('CALENDAR_URL_DAY', 'calendar.php?action=dayview&calendar={calendar}&year={year}&month={month}&day={day}');
define('CALENDAR_URL_WEEK', 'calendar.php?action=weekview&calendar={calendar}&week={week}');
define('EVENT_URL', "calendar.php?action=event&eid={eid}");
}

I'm guessing my forum is having some issues with the if statement. Should be kicking it to the else side. I flip-flopped the two sets of define statements and it looks to be working now. Still would like to know what caused the issue so I can fix it properly. Any ideas?
Does your .htaccess file have the necessary rules?
how about SEF URLs setting at the admin panel !
Quote:SEF URLs are enabled on your forum. you can disable them or add related .htaccess file

forum folder consists of a htaccess.txt file. you can rename it as .htaccess so that SEF URLs work

or if you want to disable the SEF URLs then navigate to below location and turn off it
admin panel >> configuration >> (settings) >> Server and Optimization Options
--> Enable search engine friendly URLs? <-- select disabled and save the settings
(2015-12-09, 06:02 AM).m. Wrote: [ -> ]how about SEF URLs setting at the admin panel !
Quote:SEF URLs are enabled on your forum. you can disable them or add related .htaccess file

forum folder consists of a htaccess.txt file. you can rename it as .htaccess so that SEF URLs work

or if you want to disable the SEF URLs then navigate to below location and turn off it
admin panel >> configuration >> (settings) >> Server and Optimization Options
--> Enable search engine friendly URLs? <-- select disabled and save the settings

Changing it to .htaccess fixed the problem. Thank you very much!