1
djsherren
2.5.8 White screen when viewing certain user profiles (newbb - User Profile interaction)
  • 2016/9/12 14:13

  • djsherren

  • Just popping in

  • Posts: 11

  • Since: 2010/11/18


I am currently working on updating our club website which is running on Xoops 2.0.10 to 2.5.8 on a local WAMP server. So far so good except for some odd behavior here and there. When accessing a few user profiles, a white screen results. The resulting error message is:

Fatal error: Call to undefined function newbb_attachmentImage() in C:\wamp64\www\SJG33\modules\newbb\class\post.php on line 224

The white screen error is only seen on 17 out of 324 user profiles.

From trouble shooting on this end it appears that the problem is related to some interaction between the User Profile module (1.87 Final), included with the 2.5.8 install package and the forum software newbb (4.33 RC12).

When the User Profile module is disabled, all user profiles display properly.

The common thread for the user profiles with errors is that at least one of the forum posts that are listed in the forum section of recent activity has an image attached to the posting.

To test this theory, I went into the SQL data base and cleared the entries for attachments in table: x***_bb_posts, column: attachment. After clearing this field all user profiles displayed correctly.

So for now I have disabled the User Profile module and the test site is working but I would like to use this module to get access to the additional user information fields for new user registration.

Has anyone else seen this problem? I am hoping I have missed something on a privilege or other module setting.

Thanks in advance for any help or suggestions that you may be able to offer.

Other information on the system I am running is:

Local server: WAMP 3.0.0 64 bit
XOOPS Version XOOPS 2.5.8
PHP Version 5.6.16
mySQL Version 5.7.9
Server API apache2handler
OS WINNT

2
geekwright
Re: 2.5.8 White screen when viewing certain user profiles (newbb - User Profile interaction)

Very interesting issue! I have submitted a patch for this on github.

The attached image code in newbb only worked properly when newbb was the current module (the global $xoopsModule.)

When using the basic system user lookup, there is no current module, and coincidentally, the code causing the fatal error was skipped because the file extensions were not present in a configuration of valid extensions.

When the profile module was used, there was an active module, but the file that defines newbb_attachmentImage() was not loaded because the wrong module directory was being used -- the profile directory, not newbb.

The fix is very simple, in newbb/class/post.php change line 208 from:
include_once $GLOBALS['xoops']->path('modules/' $xoopsModule->getVar('dirname''n') . '/include/functions.image.php');

to:
include_once dirname(__DIR__) . '/include/functions.image.php';


The big mystery was trying to figure out why it ever worked without error ;)

Thanks for the report!

3
djsherren
Re: 2.5.8 White screen when viewing certain user profiles (newbb - User Profile interaction)
  • 2016/9/12 20:42

  • djsherren

  • Just popping in

  • Posts: 11

  • Since: 2010/11/18


Thank you so much for the quick response. That did the trick - the user profiles are now properly displaying for all the users with the User Profile module enabled.

The help was very much appreciated.

Login

Who's Online

224 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 224


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits