Issue Details (XML | Word | Printable)

Key: MDL-19460
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Eloy Lafuente (stronk7)
Reporter: Angelo Rigo
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

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

Created: 11/Jun/09 02:39 AM   Updated: 17/Jun/09 12:33 AM
Return to search
Component/s: Wiki (1.x)
Affects Version/s: 1.9.3
Fix Version/s: 1.9.6

Environment: Linux, Apache, PHP

Database: MySQL
Participants: Angelo Rigo, Eloy Lafuente (stronk7), Helen Foster, Petr Skoda and Tim Hunt
Security Level: None
QA Assignee: Helen Foster
Difficulty: Difficult
Resolved date: 15/Jun/09
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
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



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 11/Jun/09 05:31 AM
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


Angelo Rigo added a comment - 12/Jun/09 08:05 PM
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


Eloy Lafuente (stronk7) added a comment - 15/Jun/09 06:36 AM
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).


Eloy Lafuente (stronk7) added a comment - 15/Jun/09 04:38 PM
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?


Tim Hunt added a comment - 15/Jun/09 05:09 PM
Sounds good Eloy.

Petr Skoda added a comment - 15/Jun/09 05:17 PM
+1

Angelo Rigo added a comment - 15/Jun/09 08:30 PM
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( ...

Eloy Lafuente (stronk7) added a comment - 15/Jun/09 10:09 PM
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


Eloy Lafuente (stronk7) added a comment - 15/Jun/09 11:31 PM
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


Helen Foster added a comment - 16/Jun/09 11:37 PM
Angelo, thanks for your report, and Eloy, thanks for fixing it, documenting it and posting about it

Angelo Rigo added a comment - 17/Jun/09 12:33 AM
thank you all i am glad i can contribute back to the Moodle project.