[mapguide-trac] #1501: taskframe.php fails to load absolute initial task urls

MapGuide Open Source trac_mapguide at osgeo.org
Mon Oct 25 23:39:04 EDT 2010


#1501: taskframe.php fails to load absolute initial task urls
---------------------------+------------------------------------------------
   Reporter:  jng          |       Owner:       
       Type:  defect       |      Status:  new  
   Priority:  high         |   Milestone:  2.2  
  Component:  AJAX Viewer  |     Version:  2.1.0
   Severity:  blocker      |    Keywords:       
External_id:               |  
---------------------------+------------------------------------------------
 Create a weblayout with 'http://www.google.com' as the initial task url

 This will fail to load initially.

 The affected lines are at line 60

 {{{
 $url = sprintf("%s?SESSION=%s&WEBLAYOUT=%s&DWF=%s&LOCALE=%s",
 $comp["path"], $sessionId, urlencode($webLayoutId), $dwf, $locale);
 }}}

 and line 62
 {{{
 $url = sprintf("%s?SESSION=%s&WEBLAYOUT=%s&DWF=%s&LOCALE=%s&%s",
 $comp["path"], $sessionId, urlencode($webLayoutId), $dwf, $locale,
 $comp["query"]);
 }}}

 The problem is parse_url() returning various items depending on whether
 the input parameter is an absolute or relative url.

 For absolute urls, the "path" component of the parse_url result is "/"

 The solution is to replace $comp["path"] with an intermediate variable
 which is set to:
  * Initial task pane url if it is absolute
  * $comp["path"] if it relative

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1501>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list