cancel
Showing results for 
Search instead for 
Did you mean: 

namespace warning : xmlns: URI AnetApi/xml/v1/schema/AnetApiSchema.xsd is not absolute

We're a Magento EE 1.14.2  site running a vendor extension for our CIM. Since I just finished the update to 1.14.2, I'm watching the system.log closely.

 

The log's getting lots of namespace warnings about an issue that does not seem to keep the CIM code from working. But, the warnings clutter up the log and slow finding more significant entries that require attention.

 

From other posts I've seen about this warning, the extension developer is already using the recommended code to try and prevent this error e.g.

 

 public function __call($api_call, $args)
 {
  $this->xml = @new SimpleXMLElement('<' . $api_call . '></' . $api_call . '>'); 
  $this->xml->addAttribute('xmlns', 'AnetApi/xml/v1/schema/AnetApiSchema.xsd');

 

Anyone have suggestions about how else we could code this to avoid getting these annoying log entries?

pksafety6
Member
1 REPLY 1

As this is only a warning from PHP and doesn't reflect a real problem, the simplest option would be to suppress it. The plugin developer should be able to do this by looking at which method specifically is causing the warning. Most likely, this is one of PHP's simpleXML, an example of how to parse the XML while suppressing this warning can be seen here:

 

$xml = simplexml_load_string($response,'SimpleXMLElement', LIBXML_NOWARNING);

The LIBXML_NOWARNING option will suppress XML parsing warnings on only the XML parsing while still leaving them on for the plugin in general.

Trevor
Administrator Administrator
Administrator