silverstripe-archive / silverstripe-newsletter

NewsletterAdmin is the CMS class for managing the newsletter system.
BSD 3-Clause "New" or "Revised" License
69 stars 59 forks source link

Fatal error in CMS #58

Closed bumbus closed 6 years ago

bumbus commented 10 years ago

Hi folks, unfortunatly i get this error: Fatal error: Call to a member function setTitle() on a non-object in .../newsletter/code/form/gridfield/NewsletterGridFieldDetailForm.php on line 23

when i want to open newsletter in cms.

Any ideas how to fix this.

Regards Bumbus

RoyalPulp commented 10 years ago

Hi there, I got the same error- when click button "new newsletter" in admin/newsletter Section SS 3.1.2

C10ne commented 10 years ago

You are probably using "Gridfield Better Buttons" or similar module, which changes the default actions in Model Admin. I'm also having the same issue an I'm looking for a fix.

gordonbanderson commented 10 years ago

With 'Gridfield Better Buttons' installed, the action for save is called 'action_save', whereas without the module it is called 'action_doSave'. The master version of the code is looking for a button named 'action_doSave' which does not exist, hence the error of setting a title on a non existent object. Hardwiring the action name searched for resolves the issue, but I guess a better fix is to check for the better buttons module being installed and if it is search for the save button differently. Either or searching for the default name and then the better buttons name for the save button.

wilr commented 6 years ago

See fix on #89