Moodle

broken header link to wiki when viewing non-front page

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.6
  • Fix Version/s: 1.8.7, 1.9.3
  • Component/s: Wiki (1.x)
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

When viewing a wiki page (other than the front page), the header contains a (broken) link to the front page.
The link is broken because no wiki ID is specified in the URL.

To correct this, edit mod/wiki/view.php to replace moodleID with cm->id, as shown below

diff view.php.orig view.php
279c279
< (($ewiki_title!=$wiki->name) ? " > <a href=\"view.php?id=$moodleID\">".format_string($wiki>name,true)."</a>":"").

> (($ewiki_title!=$wiki->name) ? " > <a href=\"view.php?id=$cm>id\">".format_string($wiki->name,true)."</a>":"").

Activity

Hide
Chris Potter added a comment -

I can confirm this problem and it's fix on 1.8.6

Show
Chris Potter added a comment - I can confirm this problem and it's fix on 1.8.6
Hide
Eloy Lafuente (stronk7) added a comment -

Hi Clif,

your suggested patch has been applied and woks great in 18_STABLE.

Also, when reviewing 19_STABLE and HEAD, I've detected that the "page names" in the breadcrumb weren't available anymore (due to some changes introduced in 19_STABLE to print the breadcrumb). So I've fixed that too and those links are working again im 1.9.x and 2.0dev.

Thanks and ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi Clif, your suggested patch has been applied and woks great in 18_STABLE. Also, when reviewing 19_STABLE and HEAD, I've detected that the "page names" in the breadcrumb weren't available anymore (due to some changes introduced in 19_STABLE to print the breadcrumb). So I've fixed that too and those links are working again im 1.9.x and 2.0dev. Thanks and ciao
Hide
Clif Kussmaul added a comment -

Thank you for the prompt response. I'm glad I could help.

Show
Clif Kussmaul added a comment - Thank you for the prompt response. I'm glad I could help.
Hide
Helen Foster added a comment -

Tested and working fine in 1.9.2+.

Clif, thanks for your suggested patch and Eloy, thanks for applying it

Show
Helen Foster added a comment - Tested and working fine in 1.9.2+. Clif, thanks for your suggested patch and Eloy, thanks for applying it

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: