Moodle

Wiki redirects to http://www.c2.com/cgi/wiki?

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.9.3
  • Fix Version/s: 1.9.6
  • Component/s: Wiki (1.x)
  • Labels:
    None
  • Environment:
    Linux, Apache, PHP
  • Database:
    MySQL
  • Difficulty:
    Difficult
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

When i click on a wiki it redirects to http://www.c2.com/cgi/wiki?nameofthewiki

Steps:
Just create a wiki.
Click on the link of the wiki it display the expected normal path
But redirects to : http://www.c2.com/cgi/wiki?nameofthewiki

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Sorry Angelo,

something seems to be missing in your steps:

1) Create one wiki. With any name?
2) Then the initial page edit is showed... what must I do there. Introduce anything? Click where?

The only reason to get links to that host... seems to be that you are using "interwiki" links with something like "WardsWiki" or so. Can you plz, confirm the exact data entered to reproduce the problem?

TIA and ciao

Show
Eloy Lafuente (stronk7) added a comment - Sorry Angelo, something seems to be missing in your steps: 1) Create one wiki. With any name? 2) Then the initial page edit is showed... what must I do there. Introduce anything? Click where? The only reason to get links to that host... seems to be that you are using "interwiki" links with something like "WardsWiki" or so. Can you plz, confirm the exact data entered to reproduce the problem? TIA and ciao
Hide
Angelo Rigo added a comment -

Hi Eloy

The name of the wiki is:

Wiki: Algoritmos Numéricos (referente a etapa II)

When i point the mouse over the link at the status bar i see the following addres:
http://moodle.pucrs.br/mod/wiki/view.php?id=111111

When i click on the link it goes to :
http://www.c2.com/cgi/wiki?%20Algoritmos%20Num%C3%A9ricos%20(referente%20a%20etapa%20II)

Only If logged in as admin or teacher this happens, if logged as a customized role the support it not happens. the wiki has no initial page the type is student and the ewikipageprinttiel set to yes. Lookinf for more steps and trying to reproduce.

ciao

Show
Angelo Rigo added a comment - Hi Eloy The name of the wiki is: Wiki: Algoritmos Numéricos (referente a etapa II) When i point the mouse over the link at the status bar i see the following addres: http://moodle.pucrs.br/mod/wiki/view.php?id=111111 When i click on the link it goes to : http://www.c2.com/cgi/wiki?%20Algoritmos%20Num%C3%A9ricos%20(referente%20a%20etapa%20II) Only If logged in as admin or teacher this happens, if logged as a customized role the support it not happens. the wiki has no initial page the type is student and the ewikipageprinttiel set to yes. Lookinf for more steps and trying to reproduce. ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Aha,

yes, definetively, it's the "interwiki feature" of ewiki (the wiki engine under Moodle 1.9.x) the responsible for this. So it gets any page beginning by "Wiki:" and any link to it is automatically transformed to its corresponding "interwiki" target.

So "Wiki:" goes to "WardsWiki:" that goes to "http://www.c2.com/cgi/wiki?".

Looking for info I found this: http://moodle.org/mod/forum/discuss.php?d=22849
(note that a quick workaround is to comment this line:

"Wiki" => "WardsWiki",

in mod/wiki/ewiki/ewiki.php. That way, pages beginning by "Wiki:" won't be transformed (interwiki-ed) any more.

I'll try to find a proper solution for this (perhaps some config setting or so).

Show
Eloy Lafuente (stronk7) added a comment - Aha, yes, definetively, it's the "interwiki feature" of ewiki (the wiki engine under Moodle 1.9.x) the responsible for this. So it gets any page beginning by "Wiki:" and any link to it is automatically transformed to its corresponding "interwiki" target. So "Wiki:" goes to "WardsWiki:" that goes to "http://www.c2.com/cgi/wiki?". Looking for info I found this: http://moodle.org/mod/forum/discuss.php?d=22849 (note that a quick workaround is to comment this line: "Wiki" => "WardsWiki", in mod/wiki/ewiki/ewiki.php. That way, pages beginning by "Wiki:" won't be transformed (interwiki-ed) any more. I'll try to find a proper solution for this (perhaps some config setting or so).
Hide
Eloy Lafuente (stronk7) added a comment -

I think best behaviour is:

  • add new manual wiki global config option (wikiallowinterwikilinks), defaulting to NO.

That way interwiki will be disabled by default and... if somebody was using that undocumented feature can continue using it by setting the config option in config.php file.

Sounds ok?

Show
Eloy Lafuente (stronk7) added a comment - I think best behaviour is:
  • add new manual wiki global config option (wikiallowinterwikilinks), defaulting to NO.
That way interwiki will be disabled by default and... if somebody was using that undocumented feature can continue using it by setting the config option in config.php file. Sounds ok?
Hide
Tim Hunt added a comment -

Sounds good Eloy.

Show
Tim Hunt added a comment - Sounds good Eloy.
Hide
Petr Škoda (skodak) added a comment -

+1

Show
Petr Škoda (skodak) added a comment - +1
Hide
Angelo Rigo added a comment -

Hi

The solution would be?

At mod/wiki/ewiki/ewiki.php create this constant (eg. line 80)?
define("EWIKI_ALLOW_INTERWIKI_LINKS",0); #DISABLE INTERWIKI FEATURE

At line 437:

      • InterWiki:Links
        if(EWIKI_ALLOW_INTERWIKI_LINKS==1){
        $ewiki_config["interwiki"] = @array_merge( ...
Show
Angelo Rigo added a comment - Hi The solution would be? At mod/wiki/ewiki/ewiki.php create this constant (eg. line 80)? define("EWIKI_ALLOW_INTERWIKI_LINKS",0); #DISABLE INTERWIKI FEATURE At line 437:
      • InterWiki:Links if(EWIKI_ALLOW_INTERWIKI_LINKS==1){ $ewiki_config["interwiki"] = @array_merge( ...
Hide
Eloy Lafuente (stronk7) added a comment -

Hi Angelo,

something like that but with $CFG->wiki_allow_interwiki variable for easier setting for users that could potentially be using it (I think nobody is... but who knows). Commit will land to CVS today, so this should be in next Wednesday's weekly build.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi Angelo, something like that but with $CFG->wiki_allow_interwiki variable for easier setting for users that could potentially be using it (I think nobody is... but who knows). Commit will land to CVS today, so this should be in next Wednesday's weekly build. Ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Done.

Now wiki 1.x interwiki links are disabled by default and can be re-enabled if needed by adding:

$CFG->wiki_allow_interwiki = true;

to config.php file

Also, I've commented the change in:

Resolving as fixed, ciao

Show
Eloy Lafuente (stronk7) added a comment - Done. Now wiki 1.x interwiki links are disabled by default and can be re-enabled if needed by adding:
$CFG->wiki_allow_interwiki = true;
to config.php file Also, I've commented the change in: Resolving as fixed, ciao
Hide
Helen Foster added a comment -

Angelo, thanks for your report, and Eloy, thanks for fixing it, documenting it and posting about it

Show
Helen Foster added a comment - Angelo, thanks for your report, and Eloy, thanks for fixing it, documenting it and posting about it
Hide
Angelo Rigo added a comment -

thank you all i am glad i can contribute back to the Moodle project.

Show
Angelo Rigo added a comment - thank you all i am glad i can contribute back to the Moodle project.

People

Dates

  • Created:
    Updated:
    Resolved: