How to create a New Message

Nothing appear after clicking OTHER > Messenger > New Message.

Appreciate if someone can help.

Thank you.

Pyro,

This is very odd. Please can you let me know which version of Gibbon you are running? In your PHP environment, do you have display_errors set to on? If you can make sure this is set, then you might get a useful error message.

Thanks,

Ross

Ross,

Thanks for your quick reply.

Gibbon version is “Gibbon Core v9.1.00”

Enviorment

  • Windows 8
  • XAMPP v3.2.1 (PHP 5.5.15)

I did display_errors to ON and restart Apache but I did not get any error.

However, other modules work good except messenger.

Thanks,

Pyro, that is really odd. Is the install only local, or can I get access to it?

Could you try installing the development version to see if that works: I would not recommend you use the development version, but it would be a good test if it is bug that has been fixed. You can download the dev version from https://github.com/GibbonEdu/core/tree/Gibbonv9.2.00

Ross

Ross,

The development version gave me the same result and unfortunately I run on local server.

I try to run it in difference environment(Windows7), this time I got error.

Fatal error: Cannot redeclare getSignature()(previously declared in C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\modules\Messenger\moduleFunctions.php:21)
in C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\module\Messenger\moduleFunctionos.php on line 47

Thanks,

Pyro,

This is very strange. The file \modules\Messenger\moduleFunctions.php is loaded in index.php (in most cases), and so there is code in \modules\Messenger\messenger_post.php to make sure it does not get loaded again. This code is on lines 23 to 32.

Have you done any PHP coding? If I was to ask you to change some things in \modules\Messenger\messenger_post.php would you be OK to follow my instructions?

If so, start by commenting out (e.g. add //) to the beginning of line 31. This will stop the file from being loaded again, ever, and will confirm that the problem is in this area, but is only a temporary fix.

Let me know the result of this test, and then I can send further troubleshooting instructions.

Thanks,

Ross

Ross,

I did not do any coding.

Yes, it worked after I comment it out.

I am happy that it worked, thank you.

Pyro,

Excellent news. To help us find a longer-term solution, which won’t get broken by the next update, can you please replace the following code (lines 23 to 32):

$included=FALSE ;
$includes=get_included_files() ;
foreach ($includes AS $include) {
if ($include==$_SESSION[$guid][“absolutePath”] . “/modules/” . $_SESSION[$guid][“module”] . “/moduleFunctions.php”) {
$included=TRUE ;
}
}
if ($included==FALSE) {
//include “./modules/” . $_SESSION[$guid][“module”] . “/moduleFunctions.php” ;
}

With these lines:

$included=FALSE ;
$includes=get_included_files() ;
print_r($includes) ;
print “
” . $_SESSION[$guid][“absolutePath”] . “/modules/” . $_SESSION[$guid][“module”] . “/moduleFunctions.php” ;
foreach ($includes AS $include) {
if ($include==$_SESSION[$guid][“absolutePath”] . “/modules/” . $_SESSION[$guid][“module”] . “/moduleFunctions.php”) {
$included=TRUE ;
}
}
if ($included==FALSE) {
//include “./modules/” . $_SESSION[$guid][“module”] . “/moduleFunctions.php” ;
}

You should get two lines of raw output on the screen: please post those here, and then revert the code to the way it was.

Thanks!

Ross

Ross,

This was what I got after replaced the code.

Array ( [0] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\index.php [1] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\config.php [2] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\functions.php [3] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\version.php [4] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\modules\Messenger\moduleFunctions.php [5] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\modules\Messenger\messenger_post.php ) C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00/modules/Messenger/moduleFunctions.php

I hope you can figure out something in it.

Many Thanks!

Pyro, right this looks like it is a Windows issue because it is looking through this:

Array ( [0] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\index.php [1] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\config.php [2] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\functions.php [3] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\version.php [4] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\modules\Messenger\moduleFunctions.php [5] => C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00\modules\Messenger\messenger_post.php )

To see if it can find this:

C:\xampp\htdocs\core-Gibbonv9.2.00\core-Gibbonv9.2.00/modules/Messenger/moduleFunctions.php

And it cannot because some of the slashes are the wrong way around. I believe I have a solution for this, which i will include with v10, but which you could test for me.

To do this, please remove the comment previously added, and then replace line 26, which is currently this:

if ($include==$_SESSION[$guid][“absolutePath”] . “/modules/” . $_SESSION[$guid][“module”] . “/moduleFunctions.php”) {

with this:

if (str_replace(“\",”/“,$include)==str_replace(”\",“/”,$_SESSION[$guid][“absolutePath”] . “/modules/” . $_SESSION[$guid][“module”] . “/moduleFunctions.php”)) {

Then save and try to reload the page. If it works, you can make the same change in messenger_postQuickWall.php, which will suffer from the same issue.

If it does not work, I can try again to fix it.

Thanks,

Ross

Ross,

After replaced that code, it worked great without any error or warning.

Thank,

Pyro,

Awesome news. It has been committed to v10, so when you update after release of the new version, the issue will not come back.

Thanks,

Ross