I discovered this on a dev site, but I see that production is thowing a 500 error, so I think it's broken too.

URL: https://www.drupal.org/api-d7/node.xml?type=project_release
Error: Cannot use object of type DOMDocument as array in .... sites/all/modules/drupalorg/drupalorg/drupalorg.module on line 6844

The JSON endpoint works. It's only the XML one that is broken.

Comments

zengenuity created an issue. See original summary.

drumm’s picture

Assigned: Unassigned » drumm

  • drumm committed 4199606 on 7.x-3.x, dev
    Issue #3013446: Only alter restws response when it is an array
    
drumm’s picture

Status: Active » Fixed

It looks like the way we are altering additional information into the response, like #2950080: Create an aggregated feed for SimplyTest.me, would basically have to be written twice to also support XML. The raw data used for the output formatter, DOMDocument for XML & arrays for JSON, is passed to the hook. So we’d either have to add parallel code to handle the XML-related objects, or move this data altering earlier in the process.

Rather than spend all this extra effort, I’m skipping these additions to the XML. JSON is generally preferred over XML by developers, and we have not had many complaints about the XML not working for months.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.