engineer9090909090909090 / alumnisangam

Automatically exported from code.google.com/p/alumnisangam
0 stars 0 forks source link

Posting remarks as Guest crashes profile page #129

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Stay logged out [be guest]
2. Search and reach a profile
3. Post a remark
4. See profile from step 3 again

What is the expected output? What do you see instead?
Normally formatted profile.
Instead, I see a broken page with improper formatting.

What version of the product are you using? On what operating system?
r195

Please provide any additional information below.

The error is happening since the remark "author" field is set to '0'. 

The lines like 

><?php echo $liremark->getUser()->getFullname(); ?></b

in

source›apps›frontend›modules›search›templates›profileSuccess.php

are causing problems. Since the remark was posted by guest, who has no 
fullname.

Can we say something like

<?PHP
$remauthor = $liremark->getUser
if ($remauthor){
echo $remauthor->getFullname();
}else{
echo "Guest";
}
?>

wherever it appears?

Original issue reported on code.google.com by animesh on 20 Mar 2010 at 1:54

GoogleCodeExporter commented 9 years ago
This patch remedied things for me. It works just as you suggested. 

Original comment by R.DUSHYA...@gmail.com on 22 Mar 2010 at 5:25

Attachments:

GoogleCodeExporter commented 9 years ago
Shouldn't this be done for all remarks that guests are allowed to post? [e.g., 
for 
location etc etc] ?

Original comment by animesh on 24 Mar 2010 at 6:20

GoogleCodeExporter commented 9 years ago
fixed in r196. Kudos Dhushyanth!

Original comment by animesh on 25 Mar 2010 at 7:52