Solved: 1 Year, 3 Months, 3 Weeks ago php problem showing up on memberlist/reputation
#1
Solved: 1 Year, 3 Months, 3 Weeks ago
We updated to the latest version over the weekend but this problem seemed to have cropped up in the past. I have our hosted site forced to php 7.1 because if I go to any php version higher our memberlist page will show a ton of php Warning [2] errors at the top of the page.

The recurring error (like 30 times) is something like:


File	Line	Function
/memberlist.php(512) : eval()'d code	5	errorHandler->error
/memberlist.php	512	eval
Warning [2] Use of undefined constant reputation - assumed 'reputation' (this will throw an Error in a future version of PHP) - Line: 5 - File: memberlist.php(512) : eval()'d code PHP 7.2.34 (Linux)

The fact that it mentions 'reputation' may or may not be tied to another problem that I can open a separate thread on but currently our reputation system isn't working because when you're on a members' page and try to hit the Give Rep button you just get a "javascript:void(0)" at the bottom.
Reply
#2
Solved: 1 Year, 3 Months, 3 Weeks ago
Can you post your memberlist_user template here? There seems to be an issue with it somewhere.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#3
Solved: 1 Year, 3 Months, 3 Weeks ago
(2021-03-08, 07:57 PM)Matt Wrote: Can you post your memberlist_user template here? There seems to be an issue with it somewhere.

<tr>
	<td class="{$alt_bg}" align="center">{$user['avatar']}<br>{$usergroup['groupimage']}
	{$additional_images_html}</td>
	<td class="{$alt_bg}" style="font-size:150%;"><b>{$user['profilelink']}</font></b><span class="smalltext"> (Rep: <b>{$user[reputation]}</b>) {$user['usertitle']}<br>Home: <font color=green><i>{$user['fid1']}</i></font> / Active Realm: <font color=blue><i>{$user['fid5']}</i></font></span>{$user['userstars']}
</td>
	<td class="{$alt_bg}" align="center">{$user['regdate']}</td>
	<td class="{$alt_bg}" align="center">{$user['lastvisit']}</td>
  	<td class="{$alt_bg}" align="center">{$user['postnum']}</td>
 	<td class="{$alt_bg}" align="center">{$user['threadnum']}</td>
	{$referral_bit}
</tr>
Reply
#4
Solved: 1 Year, 3 Months, 3 Weeks ago
(2021-03-08, 07:59 PM)gmOlds Wrote:
(2021-03-08, 07:57 PM)Matt Wrote: Can you post your memberlist_user template here? There seems to be an issue with it somewhere.

<tr>
	<td class="{$alt_bg}" align="center">{$user['avatar']}<br>{$usergroup['groupimage']}
	{$additional_images_html}</td>
	<td class="{$alt_bg}" style="font-size:150%;"><b>{$user['profilelink']}</font></b><span class="smalltext"> (Rep: <b>{$user[reputation]}</b>) {$user['usertitle']}<br>Home: <font color=green><i>{$user['fid1']}</i></font> / Active Realm: <font color=blue><i>{$user['fid5']}</i></font></span>{$user['userstars']}
</td>
	<td class="{$alt_bg}" align="center">{$user['regdate']}</td>
	<td class="{$alt_bg}" align="center">{$user['lastvisit']}</td>
  	<td class="{$alt_bg}" align="center">{$user['postnum']}</td>
 	<td class="{$alt_bg}" align="center">{$user['threadnum']}</td>
	{$referral_bit}
</tr>

line 4
{$user[reputation]}

to

{$user['reputation']}


something unrelated but worth pointing out as it bugs me...

 <font color=green>
<font color=blue>
etc, etc...

notice missing ""

though as I am seeing
</font>

elsewehere with no apparent start to thus then close also I am not going to get into everything on that but simply ask why when you could simply apply style as example below but I will also remind you while <font> </font> was used in html 4 it is not supported in html 5 so you would need to factor that

Quote:Not Supported in HTML5.
The
<font>
tag was used in HTML 4 to specify the font face, font size, and color of text.


instead apply style...
<span style="color:green;"></span>

<p style="color: green;"></p>

etc, etc... ?
Reply
#5
Solved: 1 Year, 3 Months, 3 Weeks ago
{$user['reputation']}

that was enough to allow me to run php 7.4 so thank you!
Reply
#6
Solved: 1 Year, 3 Months, 3 Weeks ago
(2021-03-08, 08:34 PM)gmOlds Wrote: {$user['reputation']}

that was enough to allow me to run php 7.4 so thank you!

cool beans, no worries, glad that sorted it for ya Big Grin  and as far as my other suggestions, that is for your reference on where to start making other changes more current with times, best of luck!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)