FosterCommerce / shipstation-connect

A plugin for Craft Commerce 2 that integrates with ShipStation.
https://plugins.craftcms.com/shipstationconnect
Other
7 stars 10 forks source link

Internal server error saving plugin settings when allowAdminChanges is false #10

Closed hannahwoodward closed 4 years ago

hannahwoodward commented 4 years ago

We're using this plugin on a site where we have (on production):

The client has gone to add their Shipstation username & password in the plugin settings and found that it errored when they clicked save. From the logs, it looks like the error is caused by the Shipstation plugin trying to (unsuccessfully) write to the project config file (project.yaml). Would it be possible to instead save these plugin settings in the DB?

johnnynotsolucky commented 4 years ago

@hannahwoodward I've made a change (v1.2.4) to the plugins settings to allow environment variables be stored for the username and password fields.

The problem is expected behaviour. With this change you can save the username/password as environment variables and have that committed to project.yaml, and add the environment variables to the production environment:

Screenshot from 2019-10-28 12-46-10

hannahwoodward commented 4 years ago

That works for me - thank you!