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)
Change History (7)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Milestone: | Future → 2.0 |
---|
comment:3 by , 15 years ago
External ID: | → 1015380 |
---|---|
Owner: | changed from | to
Summary: | Search.php errors → Search.php errors |
comment:4 by , 15 years ago
Status: | new → assigned |
---|
The attached patch addresses both #236 and #268. It's a port of the fixes for the following MapGuide tickets:
- MG ticket 382 (Implement RFC 43 - Support Search and Selection on Double Identity Properties)
- https://trac.osgeo.org/mapguide/changeset/2686
- add support for Int64 and Double identity properties
- https://trac.osgeo.org/mapguide/changeset/3009
- fix additional issues with Single and DateTime identity properties
- add support for feature classes with multiple identity properties
- https://trac.osgeo.org/mapguide/changeset/2686
- MG ticket 693 (PHP and ASP AJAX viewer fixes needed for simple search on NULL values)
- https://trac.osgeo.org/mapguide/changeset/3317
- add support for NULL values
- https://trac.osgeo.org/mapguide/changeset/3317
- MG ticket 1028 (Fix some PHP script typos)
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
state: | New → Committed |
Status: | assigned → closed |
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.