#693 closed defect (fixed)
PHP and ASP AJAX viewer fixes needed for simple search on NULL values - MgProxyFeatureReader.GetProperty line 448
Reported by: | cgountanis | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 2.1 |
Component: | AJAX Viewer | Version: | 2.0.1 |
Severity: | blocker | Keywords: | IsNull MgProxyFeatureReader GetProperty AJAX Viewer |
Cc: | External ID: | 1121331 |
Description (last modified by )
AJAX Viewer Fixes for PHP and ASP.NET - Value for property is null. - MgProxyFeatureReader.GetProperty line 448
Will these changes or something like this be implemented in the next release of the basic AJAX viewer? We really should not have to edit the ajaxviewer* code every implementation. Causes many problems with services packs updates and organization.
PHP - Add if statement around the switch($propType) area.
Line 158 if ($features->IsNull($propName)) { $val="(null)"; } else {
ASP.NET - Add if statement around the switch (propType) area. Line 163
if(features.IsNull(prop)) { val = "(Null)"; } else {
Attachments (4)
Change History (10)
comment:1 by , 16 years ago
Description: | modified (diff) |
---|
comment:2 by , 16 years ago
Thanks for suggested fix. I had to rework it so that it didn't have constant strings (globalization) and also added it to the Java environment. As there are no steps or data to reproduce the problem, I will have to rely on someone to test this.
- Please put the "en" file in the WebServerExtensions/www/localized folder.
- Put the .php/.asp/.jsp file in the WebServerExtensions/www/mapviewerphp or mapviewernet or mapviewerjava folder (depends on your install).
Once I have all three versions verified, I will get it reviewed further and submit. If you are testing it please make sure you have a case where the "(Null)" strings show up.
comment:3 by , 16 years ago
I could only test on MapGuide Ent 2009 at the molment.
search.aspx Line 72 There is a : before ;. Also the get setclientip and setclientagent did not work on this version of MapGuide. THis may only be an issue with Enterprise version 2009.
Line 154 There is a PHP style $ sign on locale which I think will casue issues.
search.php When you run a search you get internal error. I assume this is due to me running MapGuide 2009 Enterprise and not the latest version of MapGuide Open Source as well. I don't think the older version have SetClient or GetLocalizedString.
To simplify there is no reason to show (null) or any text for that matter. The important part is the IsNull if statement preventing the viewer from crashing. A simple IsNull = true {val=""} would do fine. That might simplify versioning right now.
comment:4 by , 16 years ago
Sorry about that, I didn't realize these files were updated; I removed the use of the problem methods (SetClient, and one other one --- these are not required for testing this anyway). And I've removed the "(null)" string; so now we don't have to worry about globalization. They should now work when you drop them in. Thanks for testing this, Tom
comment:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Beautiful work! I was able to confirm that the ASPX and the PHP do work with Null and !Null fields from the same feature source. Thank you very much! I will not be able to test JSP without complicating my IIS install.
comment:6 by , 16 years ago
External ID: | → 1121331 |
---|
by , 16 years ago
Attachment: | Search.php added |
---|
For FUSION. Replace \WebServerExtensions\www\fusion\widgets\Search\Search.php
minor formatting