Incorrect Profile icon URL link in Feedback of a view

Bug #1095221 reported by Rocky YIP
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
New
Undecided
Unassigned

Bug Description

Find that Profile icon URL link generated using the wrong field for the "id=" inside the href.

For example in this link: https://mahara.yourdomain.com/view/view.php?id=10972

The wrong link generated is: https://mahara.yourdomain.com/user/view.php?id=52250

The correct link should be https://mahara.yourdomain.com/user/view.php?id=41

The wrong link uses the value of field “artefact” in table “artefact_comment_comment”.

The correct link SHOULD uses the value of field “onview” in table “artefact_comment_comment”.

After verification both version 1.6.1 and 1.6.2 get the same problem.

The Profile icon URL link will appear in
<div class="viewfooter">
   <table id="feedbacktable" ......

Please check how to fix it.

Best Rgds,

Rocky.

Revision history for this message
Rocky YIP (rockyip-ied) wrote :

The problem is inside: mahara/artefact/comment/theme/raw/commentlist.tpl
line 6: <div class="icon"><a href="{$item->author->profileurl}">
line 9: <a href="{$item->author->profileurl}" class="username">

The value of $item->author->profileurl is wrong.

Best Rgds,

Rocky.

Revision history for this message
Rocky YIP (rockyip-ied) wrote :

I just use a alternative fix: mahara/artefact/comment/theme/raw/commentlist.tpl

Line 6:
Fom: <div class="icon"><a href="{$item->author->profileurl}">
To: <div class="icon"><a href="{$WWWROOT}user/view.php?id={$item->author->id}">

Line 9:
From: <a href="{$item->author->profileurl}" class="username">{$item->author|display_name}</a></div>
To: <a href="{$WWWROOT}user/view.php?id={$item->author->id}" class="username">{$item->author|display_name}</a></div>

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hello Rocky,

The fix on the other bug is already in review (not pushed yet):

https://reviews.mahara.org/1899 for Mahara 1.6 and
https://reviews.mahara.org/1900 for Master.

You can test the patches there and check if it does what needs to happen. And you can also comment if you think your solution would be more favorable.

You can find more information on how to set up your own local Mahara dev environment and test a patch from the review system at https://wiki.mahara.org/index.php/Developer_Area/Developer_Environment

Cheers
Kristina

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.