unclecheese/silverstripe-gridfield-betterbuttons — pull request #40 by fonsekaean (2013-10-29 09:08:03+00:00)
Title: JavaScript error when saving a new dataobject

I was getting a javascript error with I create a new record by clicking the "Save and Close" button.

after a bit of messing around found that if I add

Controller::curr()->getResponse()->addHeader('X-Reload', true);

to the GridFieldBetterButtonsItemRequest.php it works.

this happens because the LeftAndMain only follow redirects if the X-Reload is true.