My Tags (tags.php) links not working...

Bug #849898 reported by Laurent David
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Melissa Draper

Bug Description

Using the default raw theme of Mahara 1.4.0, we have noticed that the links (Sort result by : name ...) are not working.

Further investigations lead us to find the cause of it: the url is malformed: tags.php&sort=... instead of tags.php?sort=...

The issue is in ./theme/raw/templates/tags.tpl where {$results->baseurl}& should be replaced with {$results->baseurl}?

description: updated
Changed in mahara:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 1.4.1
Revision history for this message
Melissa Draper (melissa) wrote :

Hi Laurent,

This appears to only happen if someone gets to the tags page without any arguments in the url. Can you tell where you got to there from so we can check if that links needs fixing too?

Thanks

Revision history for this message
Laurent David (laurent-tdm) wrote : Re: [Bug 849898] Re: My Tags (tags.php) links not working...

I may mean that my proposed fix, could introduce other bugs as the base
url could be something with a query in it ?
We may then end up with tag.php?xxx=xxx?sort= instead of the original
tag.php?xxx=xxx&sort=

Should we rename base_url into something else? I (and maybe others)
would think of it as something without any query parameter.
On 16/09/11 01:54, Melissa Draper wrote:
> Hi Laurent,
>
> This appears to only happen if someone gets to the tags page without any
> arguments in the url. Can you tell where you got to there from so we can
> check if that links needs fixing too?
>
> Thanks
>

--
Laurent David
Technology Manager

+44 (0)129 404193

Subscribe to latest news and Open Source Software tips from TDM
<http://eepurl.com/vM0r>
tdm logo
TDM Open Source Services
w: www.tdm.info
p: +44(0)1299 404193
A: 12, High Street, Bewdley
Worcs, UK, DY12 2DH

TDM Wyre Academy
w: www.wyreacademy.com
p: +44(0)1299 405719
A: 25, Load Street, Bewdley
Worcs, UK, DY12 2AE

Revision history for this message
Melissa Draper (melissa) wrote :
Revision history for this message
Melissa Draper (melissa) wrote :

Hi laurent,

Yeah, your fix did exactly as you just described. My change above puts a check in for the baseurl to tell whether it's the plain tags.php url or not. I'm not sure this is an ideal fix though.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/703
Committed: http://gitorious.org/mahara/mahara/commit/884ccae4aec00ffe5210991e61871da160e1649d
Submitter: Hugh Davenport (<email address hidden>)
Branch: master

commit 884ccae4aec00ffe5210991e61871da160e1649d
Author: Melissa Draper <email address hidden>
Date: Fri Sep 16 13:25:16 2011 +1200

    Add check for query string on tags page (bug 849898)

    If the tags page was visited with "tags.php" via, say,
    the sidebar heading, the urls made with the template
    were broken; the query string was joined to the baseurl
    with a & rather than a ?. This patch checks if the last
    8 characters are tags.php and sets a queryprefix value
    based on the result.

    Change-Id: I56f87b76e9fb82472fda2c6cb2c5315bb3f79c05
    Signed-off-by: Melissa Draper <email address hidden>

Changed in mahara:
milestone: 1.4.1 → 1.5.0
status: Triaged → Fix Committed
assignee: nobody → Melissa Draper (melissa)
Revision history for this message
Melissa Draper (melissa) wrote :

This is still not quite right yet.

Load up http://your.mahara.site/tags.php and choose a tag from either the alphabetical list, the frequency list, or from under one of your pages. It will load successfully.

Click the link that forms after "Search results for". It will load successfully.

Click that exact same link again. It will fail as there is a & joining the query string rather than a ?.

Changed in mahara:
status: Fix Committed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/759
Committed: http://gitorious.org/mahara/mahara/commit/df7673a334d16940d550b21110d8a08984b5527a
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit df7673a334d16940d550b21110d8a08984b5527a
Author: Melissa Draper <email address hidden>
Date: Mon Oct 3 17:18:32 2011 +1300

    Additional fix for tags query joining error (bug #849898)

    The fix in commit 884ccae4aec00ffe5210991e61871da160e1649d was
    incomplete. It didn't pick up when there was an existing ? in the
    baseurl. This patch adds that check.

    Change-Id: I9666ae146ecf7ba8d8654e2cf97806f91f468d03
    Signed-off-by: Melissa Draper <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Melissa Draper (melissa)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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