Opened 16 years ago

Closed 15 years ago

#236 closed defect (fixed)

Search.php errors

Reported by: amorsell Owned by: waltweltonlair
Priority: P2 Milestone: 2.0
Component: Widgets Version: 1.1.1
Severity: Major Keywords:
Cc: Browser: All
External ID: 1015380 Operating System: All
state: Committed

Description

This appears to still be present in 2.0b as well as older releases. If the search widget encounters what it thinks is a null value, it will crash with an error like:

"Value for PARCEL_NUM property is null. Exception occurred in method MgProxyFeatureReader.GetProperty at line 448 in file d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\common\mapguidecommon\Services/ProxyFeatureReader.cpp"

To prevent this error, a change in search.php similar to http://trac.osgeo.org/mapguide/changeset/3318 needs to occur. Specifically, the Switch statement around line 170 needs to be wrapped in an if statment with the changed code being:

if (!$features->IsNull($propName)) {

switch($propType)

{

case MgPropertyType::Boolean:

$val = $features->GetBoolean($propName)? "true": "false"; break;

case MgPropertyType::Single:

$val = $features->GetSingle($propName); break;

case MgPropertyType::Double:

$val = $features->GetDouble($propName); break;

case MgPropertyType::Int16:

$val = $features->GetInt16($propName); break;

case MgPropertyType::Int32:

$val = $features->GetInt32($propName); break;

case MgPropertyType::Int64:

$val = $features->GetInt64($propName); break;

case MgPropertyType::String:

$val = $features->GetString($propName); break;

}

}

Attachments (2)

SearchFixes_mg21.patch (7.5 KB ) - added by waltweltonlair 15 years ago.
Patch for fusion2-mg21 branch
SearchFixes_trunk.patch (7.5 KB ) - added by waltweltonlair 15 years ago.
patch for trunk

Download all attachments as: .zip

Change History (7)

comment:1 by amorsell, 16 years ago

This package can help see the errors:

ftp://mapguide.spatialgis.com/Search_widget_issue.mgp

Open the layout in a browser and do a Search by Owner Name on Jones to see the error. Ticket 237 appears to be related.

comment:2 by amorsell, 16 years ago

Milestone: Future2.0

comment:3 by waltweltonlair, 15 years ago

External ID: 1015380
Owner: changed from madair to waltweltonlair
Summary: Search.php errorsSearch.php errors

by waltweltonlair, 15 years ago

Attachment: SearchFixes_mg21.patch added

Patch for fusion2-mg21 branch

comment:4 by waltweltonlair, 15 years ago

Status: newassigned

The attached patch addresses both #236 and #268. It's a port of the fixes for the following MapGuide tickets:

by waltweltonlair, 15 years ago

Attachment: SearchFixes_trunk.patch added

patch for trunk

comment:5 by waltweltonlair, 15 years ago

Resolution: fixed
state: NewCommitted
Status: assignedclosed
  • fixed in the trunk stream with r1865
  • fixed in the fusion2-mg21 stream with r1866
Note: See TracTickets for help on using tickets.