You are not logged in.
Pages: 1
I just updated a site to 4.4.3. We'd noticed an issue when configuring Authorize.Net (under Developer > Payment Gateway > Authorize.Net). The form fields appear to update successfully (we see the "Updated Payment Gateway" message and get redirected to the Developer root), but once we return to the form, the fields are blank again. I did some digging and it looks like a CMS bug.
The form loads saved values for each field from a BigTreePaymentGateway object. The actual settings appear to be saving correctly when the form is submitted; it’s just that the Settings and Service properties of the BigTreePaymentGateway object don't seem to be set correctly in the constructor (in core/inc/bigtree/apis/payment-gateway.php) .
The BigTreePaymentGateway constructor calls BigTreeCMS::getSetting('bigtree-internal-payment-gateway’).
public function __construct($gateway_override = false) {
// This returns an array of settings
$s = BigTreeCMS::getSetting("bigtree-internal-payment-gateway");
// ... other stuff I cut out for relevance
// Makes an empty setting if it doesn't exist--the structure doesn't match so it sets the properties as empty
$this->Service = isset($s["value"]["service"]) ? $s["value"]["service"] : "";
$this->Settings = isset($s["value"]["settings"]) ? $s["value"]["settings"] : array();
// ... the rest of the function cut out for relevance
The problem is that BigTreeCMS::getSetting returns a string or array of the setting’s value, and the BigTreePaymentGateway constructor is looking for it to return an array with the ‘value’ key set to the setting’s value. The structure expected doesn’t match the structure returned, so it’s treated as if there are no settings.
I noticed BigTreeAdmin::getSetting looks like it does return the expected structure at least in most cases (and was used in earlier versions), in case that's helpful for resolving this.
Thanks.
Offline
I just received a similar bug report about S3 credentials not saving as well. I'll take a look into fixing this tomorrow morning and getting a 4.4.4 release out on Friday.
Offline
This and several other settings related issues were fixed in this commit!
https://github.com/bigtreecms/BigTree-C … dce76e5fb1
Thanks for the bug report!
Offline
Thanks!
Offline
Pages: 1