No Fatal Error PRoblem in forums

No Fatal Error PRoblem in forums

by Lewis Philips -
Number of replies: 8
Trying to create a news forum item. The item was accepted however, when I try to retrieve it I get a Fatal Error message as follows:

Fatal error: Call to undefined function: fullname() in /home/www/alabama-oxygen-nitrox-aed/moodle/mod/forum/lib.php on line 1132

The code in the area is as follows. The asteriks indicate what my text editor reflects to be line 1132

*** $fullname = fullname($post, $isteacher);
$by->name = "wwwroot/user/view.php?id=$post->userid&course=$courseid\">$fullname";
$by->date = userdate($post->modified);
print_string("bynameondate", "forum", $by);

echo "";
echo "cellcontent2\" valign=\"top\" class=\"forumpostside\" width=\"10\">";
if ($group = user_group($courseid, $post->userid)) {
print_group_picture($group, $courseid, false, false, false);
} else {
echo " ";
}
echo "cellcontent\" class=\"forumpostmessage\">\n";

Any suggestions would be greatly appreciated
Average of ratings: -
In reply to Lewis Philips

Re: No Fatal Error PRoblem in forums

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You can't upgrade the forum module just on its own ... you need to upgrade the whole of Moodle to 1.2.  (Nice-looking post, that! smile )
In reply to Martin Dougiamas

Re: No Fatal Error PRoblem in forums

by Lewis Philips -
I just downloaded moogle on Monday so I guess that is the 1.2 version. I will know better when it is time to upgrade.

It appears I still have a small problem, an inoperative "Save changes" button when I am trying to add a new forum. I click but nothing happens.

From what I see of Moogle so far this is an incredible piece of work. I noticed a reference to the possible incorporation of Paypal into the registration system (possibly in 2003) but I don't find any reference in the documentation. Did that incorporation ever take place?

Thanks for the help.
In reply to Martin Dougiamas

Re: No Fatal Error PRoblem in forums

by Przemyslaw Stencel -
Yes, it is a beautiful post, but the question remains - how did this happen? I guess it's because Lewis included php code in his post, but how is it possible that php code inside a post can ruin a discussion display? Is it a bug? Could it be a possible security issue? If Lewis unintentionally messed up the forum, could this be done intentionally by others?
In reply to Przemyslaw Stencel

Re: No Fatal Error PRoblem in forums

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
PHP would be ignored, so there is no security issue. The problem is the posted code has fragments of a HTML table which the browser mixes up with the table that makes up the post. Short of actually parsing all the table tags in a post to make sure they are closed properly (which would be hard) there is no way I can think of to stop this.

We could prevent all table tags in posts but that would be rather extreme.
In reply to Martin Dougiamas

Re: No Fatal Error PRoblem in forums

by Geoff Roberts -

ask around at places like phpbb.com how they deal with it.

In reply to Geoff Roberts

Re: No Fatal Error PRoblem in forums

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Well they don't even allow HTML - they use BBCODE and similar custom markup schemes (eg [b]bold words[/b] ). It's not even possible to make tables in those forums. Personally, I'd much rather have the added functionality of HTML.
In reply to Martin Dougiamas

Re: No Fatal Error PRoblem in forums

by Lewis Philips -
Apparently I messed things up a little with my post. I can assure you it was unintentional. I will try not to have that happen again.

I was just cutting and pasting to provide the most accurate description of the problem. If this will create a problem such as this is the future I will come up with a less disruptive method to provide a description of the problem.
In reply to Lewis Philips

Re: No Fatal Error PRoblem in forums

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

No problems, Lewis - just use "Plain text format" from the Formatting menu under the editing area.

eg


<!-- END OF HEADER -->
<a name="19807"></a><table class="forumpost" cellspacing="0" cellpadding="3" border="0"><tbody><tr><td valign="top" width="35" class="forumpostpicture" bgcolor="#fee6b9"><a href="http://moodle.org/user/view.php?id=11032&course=5"><img alt="" height="35" width="35" border="0" src="http://moodle.org/pix/u/f2.png" align="middle" /></a></td><td width="100%" class="forumpostheader" bgcolor="#ffd991"><p><font size="3"><b>Re: No Fatal Error PRoblem in forums</b></font><br \="" /><font size="2">by <a href="http://moodle.org/user/view.php?id=11032&course=5">Lewis Philips</a> - Thursday, 8 January 2004, 10:19 PM</font></p></td></tr><tr><td width="10" class="forumpostside" valign="top" bgcolor="#fee6b9"> <br /></td><td class="forumpostmessage" bgcolor="#ffffff">
Apparently I messed things up a little with my post. I can assure you
it was unintentional. I will try not to have that happen again.<br /><br />I
was just cutting and pasting to provide the most accurate description
of the problem. If this will create a problem such as this is the
future I will come up with a less disruptive method to provide a
description of the problem.</td></tr></tbody></table>