We are hosting with Pantheon, who only allows writing files to the public:// or private:// filesystem, not to the rest of the site files. There are a number of other hosts that work like this also, so it's not specific just to Pantheon I don't think.

The module is setting the JSON destination path to $response['data']['info']['site_name'] . "." . "json", but file_unmanaged_save_data's documentation says "This must be a stream wrapper URI."

Would it be possible to prefix that filename with `public://` in the module to allow it to support environments that only allow writing to the files directory? I tested it locally and it works fine, I will submit a patch momentarily.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bmcclure created an issue. See original summary.

bmcclure’s picture

Perhaps private:// would be a better place, but I think either option would be better than not specifying a stream wrapper.

bmcclure’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
594 bytes

Here's the mentioned patch I'm using on Pantheon currently.

gaurav.kapoor’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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