Opened 16 years ago

Closed 16 years ago

#201 closed defect (fixed)

load WMC fails / WMC does not contain layer data

Reported by: christoph Owned by: christoph
Priority: critical Milestone: 2.5 release
Component: wmc Version: 2.4.4
Keywords: Cc:

Description

There is no error message while saving the WMC, however the WMC does not contain any layer information:

<LayerList/>

When loading this WMC, you get an error message like

syntax error window.opener.mb_registerMapObj(old_mapObj[i].frameName, old_mapObj[i].element...

Change History (3)

comment:1 by christoph, 16 years ago

Owner: changed from mapbender_dev@… to christoph

comment:2 by christoph, 16 years ago

Milestone: 3.0 release2.5 release

it seems like PHPJson is a little buggy when it comes to large data. I replaced it in a script by PHP's native JSON function (beware, PHP > 5.2!), and then it worked.

We will have to see how we can deal with that.

comment:3 by christoph, 16 years ago

Resolution: fixed
Status: newclosed

There is a new class

class_json.php

that selects the best option for JSON encoding. Basically, it checks if the native function "json_encode" (or "decode") exists. If yes, it is used, if not, the functions from the PEAR lib Services_JSON are used.

If you have PHP < 5.2, you can install the JSON function manually, see http://www.aurore.net/projects/php-json/ or http://extjs.com/learn/Tutorial:Creating_JSON_Data_in_PHP

Fixed in 2.5 rc2

Note: See TracTickets for help on using tickets.