Skip to main content
Topic: RC1: Call to undefined function loadMessageRequest()  (Read 1569 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

RC1: Call to undefined function loadMessageRequest()

So I just followed the download link to the RC1 and I grabbed the tar.gz source code version.  I extracted it into a new directory, copied over Settings.php and Settings_bak.php from my working forum and then renamed the directory to be the same.  Immediately hit a nasty bug that I cannot view messages.

I get
PHP Fatal error:  Call to undefined function loadMessageRequest() in /var/www/forum/sources/controllers/Display.controller.php on line 574, referer: ...

I added an unconditional require_once(SUBSDIR . '/Messages.subs.php'); and it's working now.

Not sure why I'm hitting this and it didn't get caught.  I removed all mods from my forum before moving to the rc1 files.

Re: RC1: Call to undefined function loadMessageRequest()

Reply #1

The only load of Messages.subs.php is in this

Code: [Select]
		if (!empty($modSettings['oldTopicDays']))
{
require_once(SUBSDIR . '/Messages.subs.php');
$mgsOptions = basicMessageInfo($topicinfo['id_last_msg'], true);
$context['oldTopicError'] = $mgsOptions['poster_time'] + $modSettings['oldTopicDays'] * 86400 < time() && empty($topicinfo['is_sticky']);
}
Well my modSettings doesn't have oldTopicDays so that code doesn't get called.

Re: RC1: Call to undefined function loadMessageRequest()

Reply #2

That's indeed a bug... and guess what?
It's my fault! LOL

At lest it should be:
Code: [Select]
		require_once(SUBSDIR . '/Messages.subs.php');
if (!empty($modSettings['oldTopicDays']))
{
$mgsOptions = basicMessageInfo($topicinfo['id_last_msg'], true);
$context['oldTopicError'] = $mgsOptions['poster_time'] + $modSettings['oldTopicDays'] * 86400 < time() && empty($topicinfo['is_sticky']);
}
Bugs creator.
Features destroyer.
Template killer.