[Mapguide-trac] [mapguide-trac] #979: WebLayout XML must be formatted/indented correctly whereas others (Layer, MapDefinition, Data) do not.

MapGuide Open Source trac_mapguide at osgeo.org
Tue Nov 8 04:56:25 PST 2022


#979: WebLayout XML must be formatted/indented correctly whereas others (Layer,
MapDefinition, Data) do not.
-------------------------+----------------------
 Reporter:  cagray       |        Owner:  jng
     Type:  defect       |       Status:  closed
 Priority:  low          |    Milestone:  4.0
Component:  AJAX Viewer  |      Version:  2.2.0
 Severity:  trivial      |   Resolution:  fixed
 Keywords:               |  External ID:
-------------------------+----------------------
Changes (by jng):

 * owner:  (none) => jng
 * status:  new => closed
 * resolution:   => fixed

Comment:

 In [changeset:"10008" 10008]:
 {{{#!CommitTicketReference repository="" revision="10008"
 Fix a 14 year old (!!!) long standing bug with MgWebLayout loading
 unformatted WebLayout XML. The issue is due to an unnecessary null pointer
 check in MgWebLayout::ParsePrintCommand(). When the XML is unformatted,
 the DOMNode ptr will be null, when the XML is formatted, the DOMNode ptr
 is not null, but inspecting this pointer shows that the DOMNode pointer is
 for a #text region (ie. Whitespace).

 Since the method itself is ultimately trying to parse an *optional*
 <PrintLayout> that may or may not be present, there is no need for the
 incoming DOMNode ptr to actually not be null. If it's null, just bail out
 early and move on.

 A new WebTestRunner test case has been added to exercise this particular
 case.

 Fixes #979
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/979#comment:9>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list