Issue Details (XML | Word | Printable)

Key: MDL-17548
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Martin Dougiamas
Reporter: Jonathan Harker
Votes: 1
Watchers: 3
Operations

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

MNET jump links in forum emails have incorrect path when wwwroot contains a path

Created: 08/Dec/08 08:15 AM   Updated: 25/Mar/09 12:53 AM
Return to search
Component/s: Forum, Messages, Networking
Affects Version/s: 1.9.3, 2.0
Fix Version/s: 1.9.4

File Attachments: 1. Text File MDL-17548.HEAD.patch (1.0 kB)
2. Text File MDL-17548.MOODLE_19_STABLE.patch (1.0 kB)


Participants: Dan Poltawski, Eloy Lafuente (stronk7), Jonathan Harker, Martin Dougiamas and Peter Bulmer
Security Level: None
QA Assignee: Petr Skoda
Resolved date: 23/Mar/09
Affected Branches: MOODLE_19_STABLE, MOODLE_20_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
If $CFG->wwwroot contains a path component (e.g. /moodle in http://contentprovider.com/moodle or similar), then the MNET jump URLs to the forum threads on the CP that get written into forum emails contain a double-up of the path - on the end of hostwwwroot and the beginning of wantsurl. For instance:

http://idprovider.com/mnet/jump.php?hostwwwroot=http://contentprovider.com/moodle&wantsurl=/moodle/mod/forum/discuss.php...

Attached fix.


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Jonathan Harker made changes - 08/Dec/08 08:22 AM
Field Original Value New Value
Description If $CFG->wwwroot contains a path component (e.g. / moodle in http://contentprovider.com/moodle or similar), then the MNET jump URLs to the forum threads on the CP that get written into forum emails contain a double-up of the path - on the end of hostwwwroot and the beginning of wantsurl. For instance:

http://idprovider.com/mnet/jump.php?hostwwwroot=http://contentprovider.com/moodle&wantsurl=/moodle/mod/forum/discuss.php...

Attached fix.
If $CFG->wwwroot contains a path component (e.g. /moodle in http://contentprovider.com/moodle or similar), then the MNET jump URLs to the forum threads on the CP that get written into forum emails contain a double-up of the path - on the end of hostwwwroot and the beginning of wantsurl. For instance:

http://idprovider.com/mnet/jump.php?hostwwwroot=http://contentprovider.com/moodle&wantsurl=/moodle/mod/forum/discuss.php...

Attached fix.
Jonathan Harker added a comment - 08/Dec/08 12:51 PM
Patch for head - PHP 5 supports the extra PHP_URL_PATH parameter.

Jonathan Harker made changes - 08/Dec/08 12:51 PM
Attachment MDL-17548.HEAD.patch [ 15831 ]
Jonathan Harker made changes - 08/Dec/08 12:51 PM
Attachment mnet-fixy.patch [ 15829 ]
Jonathan Harker added a comment - 08/Dec/08 12:53 PM
Fix for MOODLE_19_STABLE has to support the PHP 4 incantation of parse_url

Jonathan Harker made changes - 08/Dec/08 12:53 PM
Attachment MDL-17548.MOODLE_19_STABLE.patch [ 15832 ]
Dan Poltawski added a comment - 12/Dec/08 08:20 AM
(Not really looked at this - ). But presumably this fixes the wantsurl part?

Peter Bulmer added a comment - 12/Dec/08 08:43 AM
DanP, Yep.

I've looked at it, it's a good patch IMO


Eloy Lafuente (stronk7) added a comment - 12/Dec/08 09:06 AM
+1 yay!

jonathanharker committed 1 file to 'Moodle CVS' - 15/Dec/08 07:50 AM
MDL-17548 MNET: Fix email links for sites with path component in wwwroot

Where Moodle sites had a path in their wwwroot, the MNET function that
forced remote users to go via their identity provider (to make sure they
were logged in) previously directed the user back to a URL like
contentprovider.com/moodle/moodle/mod/forum/view.php?f=7 where there
should only be one /moodle in the middle of the URL.
MODIFY mnet/lib.php   Rev. 1.31    (+10 -2 lines)
jonathanharker committed 1 file to 'Moodle CVS' on branch 'MOODLE_19_STABLE' - 15/Dec/08 08:40 AM
MDL-17548 MNET: Fix email links for sites with path component in wwwroot

Where Moodle sites have a path in their wwwroot, the MNET function that
forced remote users to go via their identity provider (to make sure they
were logged in) previously directed the user back to a URL like
contentprovider.com/moodle/moodle/mod/forum/view.php?f=7 where there
should only be one /moodle in the middle of the URL.

Slightly tweaked from HEAD to support PHP4
MODIFY mnet/lib.php   Rev. 1.16.2.9    (+10 -2 lines)
Jonathan Harker added a comment - 15/Dec/08 08:41 AM
Now committed to HEAD and MOODLE_19_STABLE
Cheers again
J

Dan Poltawski added a comment - 23/Mar/09 08:28 AM
Closing as fixed as this has been commited

Dan Poltawski made changes - 23/Mar/09 08:28 AM
Fix Version/s 1.9.4 [ 10300 ]
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Petr Skoda made changes - 25/Mar/09 12:53 AM
QA Assignee skodak
Status Resolved [ 5 ] Closed [ 6 ]