Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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 jbirch)

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))

ASP.NET - Add if statement around the switch (propType) area. Line 163

val = "(Null)";

Attachments (4)

search.aspx (12.7 KB) - added by tomfukushima 9 years ago.
Goes to mapviewernet directory
search.jsp (11.8 KB) - added by tomfukushima 9 years ago.
Goes to mapviewerjava directory
search.php (10.9 KB) - added by tomfukushima 9 years ago.
Goes to mapviewerphp directory
Search.php (10.8 KB) - added by amorsell 9 years ago.
For FUSION. Replace \WebServerExtensions?\www\fusion\widgets\Search\Search.php

Download all attachments as: .zip

Change History (10)

comment:1 Changed 9 years ago by jbirch

Description: modified (diff)

minor formatting

comment:2 Changed 9 years ago by tomfukushima

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.

  1. Please put the "en" file in the WebServerExtensions/www/localized folder.
  2. 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 Changed 9 years ago by cgountanis

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.

Changed 9 years ago by tomfukushima

Attachment: search.aspx added

Goes to mapviewernet directory

Changed 9 years ago by tomfukushima

Attachment: search.jsp added

Goes to mapviewerjava directory

Changed 9 years ago by tomfukushima

Attachment: search.php added

Goes to mapviewerphp directory

comment:4 Changed 9 years ago by tomfukushima

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 Changed 9 years ago by cgountanis

Resolution: fixed
Status: newclosed

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 Changed 9 years ago by tomfukushima

External ID: 1121331

r3317 for trunk. r3318 for 2.0.2.

I got someone here to test the .jsp page and it worked as well.

Chris, thanks for your help. Tom

Changed 9 years ago by amorsell

Attachment: Search.php added

For FUSION. Replace \WebServerExtensions?\www\fusion\widgets\Search\Search.php

Note: See TracTickets for help on using tickets.