MantisBT - ATutor
View Issue Details
0004988ATutorPretty Urlpublic2012-05-31 12:082012-08-31 17:48
0004988: pretty URL fails in multisite
Pretty URL does not work on a multisite sub site. always redirects back to the course home page.
No tags attached.
Issue History
2012-05-31 12:08gregNew Issue
2012-05-31 12:10gregNote Added: 0005562
2012-07-12 12:59gregAssigned To => cindy
2012-07-12 12:59gregStatusnew => assigned
2012-07-25 16:05gregNote Added: 0005702
2012-07-25 16:05gregNote Edited: 0005702bug_revision_view_page.php?bugnote_id=5702#r64
2012-07-25 16:31gregNote Added: 0005703
2012-07-26 09:28gregNote Added: 0005705
2012-07-26 13:15cindySVN Revision# => a0f6bb2dc2a9b1c50eae02bb0813bb505efa2712
2012-07-26 13:15cindyNote Added: 0005786
2012-07-26 13:15cindyStatusassigned => resolved
2012-07-26 13:15cindyFixed in Version => 2.1
2012-07-26 13:15cindyResolutionopen => fixed
2012-08-31 17:48gregNote Added: 0005826
2012-08-31 17:48gregStatusresolved => closed

2012-05-31 12:10   
so does course name in URLs
2012-07-25 16:05   
Pretty URL seems to work on its own for both main and sub sites. When course name url is turned on and a name for a site is defined in its course properties, that breaks for subsites but not for the main site. When course name is turned on but a name has not been set, things work okay.

No php errors get generated, unfortunately.

2012-07-25 16:31   
The problem seems to be at line 85/86 in include/classes/UrlRewrite/UrlParser.class.php. For some reason the query does not return a value, though if the sql is run manually, the course_id is returned. $course_id always returns as 0.
2012-07-26 09:28   
The problem seems to be related to the database connection. When on MyStart for instance, a list of the subsite's courses are displayed. If you force the course_id to 1 so you can get into the course, it gets the course from the main site's db. Thus if you name the course name url value the same in both the subsite and main site course properties, course name url works, though you get the course from the main site displayed on the subsite.
2012-07-26 13:15   
Solution: Calculates the site path and includes the correct

Affected: go.php
2012-08-31 17:48   
closed in ATutor 2.1