Closed jimt closed 6 years ago
As a quick fix, we could do a "If the list isn't saved, filter -- if it is, don't filter"? That would retain the functionality and get it working.
I have no idea off hand if something has changed in framework to cause this, or it was just not seen for this long. Might be worth grabbing someone who knows what they're doing to comment.
Some additional logging suggests the method's first call when the Mailing LIst tab is clicked is for a mailing list with ID==0 (and no title) which doesn't exist. My first mailing list appears to have ID==1. The right solution is doubtlessly figuring out why it is now looking for list zero, but for now this gets me going:
public function ActiveRecipients() {
if ($this->ID) {
return $this->Recipients()->exclude('Blacklisted', 1)->exclude('Verified', 0);
} else {
return $this->Recipients();
}
}
Fixed in ab2de6fb
After updating from SilverStripe 3.0 to 3.1.3, and the newsletter module to trunk 77d916e29 I get an error when I visit the admin/newsletter/MailingList page:
I can eliminate the error (and some of the functionality :-/ ) by changing the value returned by:
to simply: