2015-12-08, 07:20 PM
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?
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?