Mapguide Open source 2.4 RC1 selection problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapguide Open source 2.4 RC1 selection problem

marfalox
Hi all,

working with MGos 2.4 RC1 on ubuntu 12.04 we got a problem with selection properties, not showing anymore in properties panel (ajax viewer).
Apache log said that

Strict Standards: Non-static method DOMDocument::loadXML() should not be called statically in /usr/local/mapguideopensource-2.4.0/webserverextensions/www/mapviewerphp/getselectedfeatures.php on line 420

Modifing the GetLayerPropertyMappings function in getselectedfeatures.php selection properties worked again as expected. The new function is:

function GetLayerPropertyMappings($resourceService, $layer) {
    $mappings = array();
    $byteReader = $resourceService->GetResourceContent($layer->GetLayerDefinition());
    //inizio modifica
    $xmldoc = new DOMDocument();
    $xmldoc->loadXML(ByteReaderToString($byteReader));
    //$xmldoc = DOMDocument::loadXML(ByteReaderToString($byteReader));
    //$mappingNodeList = $xmldoc->getElementsByTagName('PropertyMapping');
    $mappingNodeList = $xmldoc->getElementsByTagName('PropertyMapping');
    for ($i=0; $i<$mappingNodeList->length; $i++) {
        $mapping = $mappingNodeList->item($i);
        $nameElt = $mapping->getElementsByTagName('Name');
        $name = $nameElt->item(0)->nodeValue;
        $valueElt = $mapping->getElementsByTagName('Value');
        $value = $valueElt->item(0)->nodeValue;
        $mappings[$name] = $value;
    }
    return $mappings;
}


Same problem happened up to now in mapviewerphp/legend.php and schemareport/displayschemafunctions.php

Anybody else with the same problem?

Marco
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide Open source 2.4 RC1 selection problem

Jackie Ng
Did you change the error reporting settings of php.ini?

I wouldn't be surprised if some of the PHP code in MapGuide is written in such a fashion that would trigger such "errors"

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide Open source 2.4 RC1 selection problem

marfalox
Yes, site is under developement, so settings have been changed to:

error_reporting  =  E_ALL | E_STRICT
display_errors = On

When we make selections no error is showed in the viewer, but properties are not showed in the panel. Changing the code everything seems to work correctly.
Do you think it is correct or can trigger problems elsewhere?

Thanks for your reply, regards
Marco