- Issue created by @cestmoi
It turned out that I had to select at least one newsletter under 'Visible Newsletters' on the block config page. Now everything seems to be functioning as expected. I hope this helps someone who comes across such an issue.
Perhaps it's better if the block wouldn't save without selecting a newsletter or at least a warning message is shown on the block config page.
- First commit to issue fork.
- Assigned to himanshu_jhaloya
- 🇮🇳India himanshu_jhaloya Indore
Hi, I followed the Steps to reproduce the issue I found that for anonymous it also shows that You are already subscribed to resolve this issue I have Added a message on the block admin page to select a newsletter and ' Visible Newsletters ' a required field.
please review the patch. - Issue was unassigned.
- Status changed to Needs review
9 months ago 8:01am 16 February 2024 - last update
9 months ago 61 pass - Status changed to Needs work
9 months ago 9:42am 16 February 2024 - 🇩🇰Denmark ressa Copenhagen
Thanks @himanshu_jhaloya! As I commented in the other issue, manually attaching patches is being phased out, and you should create a patch and Merge Request with the Gitlab integration.
DrupalCI and all patch testing will be turned off on July 1, 2024 →
- last update
9 months ago 61 pass - Status changed to Needs review
9 months ago 10:11am 16 February 2024 - 🇩🇰Denmark ressa Copenhagen
Nice, thanks @himanshu_jhaloya I really appreciate it.
Thank you @himanshu_jhaloya but this patch while addressed the required select on the block config page, it's causing the below error on trying to access any page that has the block:
Error: Call to undefined method Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsButtonsWidget::setAvailableNewsletterIds() in Drupal\simplenews\Form\SubscriptionsBlockForm->form() (line 131 of ..... \web\modules\contrib\simplenews\src\Form\SubscriptionsBlockForm.php).
- Status changed to Needs work
9 months ago 3:00am 18 February 2024 - 🇬🇧United Kingdom adamps
The requirement is that you must set either
newsletters
ordefault_newsletters
. Either one can be blank, but not both. - Merge request !50#3421481 Validate that block config includes at least one newsletter → (Open) created by adamps
- last update
9 months ago 61 pass - Status changed to Needs review
9 months ago 10:57am 26 February 2024 - last update
9 months ago 61 pass - Status changed to Fixed
9 months ago 1:40pm 26 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.