silverstripe-gridfield-betterbuttons icon indicating copy to clipboard operation
silverstripe-gridfield-betterbuttons copied to clipboard

YAML config setting for better_buttons_enabled is always 1 and is never true

Open textagroup opened this issue 9 years ago • 2 comments

Have a issue with a SilverStripe 3.2.1 install with the Newsletter module running on on php 5.6.20. Have tried disabling betterbuttons as per the documentation by using the following YAML config

Newsletter:
  better_buttons_enabled: false

However $this->owner->record->stat('better_buttons_enabled') in GridFieldBetterButtonsItemRequest->updateItemEditFrom is always seen as 1 so the if statement is never executed.

Have got around the issue by using the following YAML config

Newsletter:
  better_buttons_enabled: 'false'

textagroup avatar May 15 '16 22:05 textagroup

That's really odd. false should be evaluated as a boolean in YAML. Does 0 work? I'd be curious about any other info you can provide. Does false work in other configs?

unclecheese avatar Aug 23 '16 01:08 unclecheese

Sorry for the late reply I am on Sabbatical at the moment so I have not been checking my Github account that frequently. I do believe I tried setting better_buttons_enabled to 0 but it had no effect. Have not tried false with any other YAML configs

textagroup avatar Aug 31 '16 15:08 textagroup