- Issue created by @NicholasS
- πΊπΈUnited States NicholasS
Got an initial start on the refactor today. Currently it can install, has settings that can be saved, a block to allow subscriptions, a route to see subscriptions, but still needs a lot more work and features. hopefully I get some more time next week.
- πΊπΈUnited States NicholasS
Would a maintainer please take a look at my initial refactor of this module to v4. And update hook should migrate all the old subscriptions. I choose not to try to migrate all the old settings so user will have to redo their templates etc. But would love some feed on what I have so far. I tested it and so far looks to work pretty well for me.
- πΊπΈUnited States NicholasS
Recently added Flood protection to the module. The one aspect I think that could use some work is the signup block, would love to make it a button, that spawns a modal(native dialog) and the modal contains the signup form, and posts/updates with error handling in the modal.
But I think a lot of the other areas of the module are solid, so I am going to open a Merge Request for it so it can get some maintainer attention, would love to merge it to a 4.x branch but Gitlab doesn't allow me to do that, so for now I will MR to the 3.x.
- Merge request !4Draft: Complete 4.0 refactor to use custom entity type β (Open) created by NicholasS
- πΊπΈUnited States risweb
Hey nicholass,
Is there a way to keep customer's settings and templates so after updating this module users don't have to re-create those? Thank you for working on this module and making it better.
- πΊπΈUnited States NicholasS
So I migrated all the config I think I can, some of the "Flow" is a bit different so I am not sure the old templates make 100% sense in the new version. Also there is not "manage subscriptions" page, this version simplifies things and all emails just have an unsubscribe link (like slickdeals/camelcamel etc do it). And some of the old v3 emails are just notifications in the newer version.
Here are some screenshots
- πΊπΈUnited States NicholasS
Drupal Status message after verification link is clicked
- πΊπΈUnited States NicholasS
Manual Addition: Most my clients have emails often from other sources like paper signup forms etc
Migration page with auto complete to transfer subscriptions from one entity to another
- πΊπΈUnited States NicholasS
Manual Notification: Some people may not want to edit/modify the content which would affect the date, maybe its a reminder that something is the last day or something, so put in a manual notification option.
- πΊπΈUnited States risweb
Hey nicholass,
I tested v4 and over all everything looks good. Thank you for all the efforts you putting into this module! I found two things:
1. I don't get the verification link (see attached screenshot) only text "Please confirm your subscription" not hyperlinked. Where do I configure that or did I miss something? I also attached the screenshot for templates settings.
2. After I submit my form to subscribe to a page, I get this message: The subscription form is temporarily unavailable.
Is this message is because I just subscribed to the page and module is waiting to verification link? Can we modify that message to custom test there? The "The subscription form is temporarily unavailable." looks to me like "something is not working right". - πΊπΈUnited States NicholasS
Added more features to it such as verified HTML emails are created, allowing hooks and headers and footers so people can customize the email templates as well. Along with an option for the block to be a button and a modal to save on UI real-estate. Also added logic for people who are already subscribed and attempting to re-subscribe.
Tested with a core Drupal 10 install as well, and improved the
- πΊπΈUnited States NicholasS
@risweb
#1 I think was a bug and I fixed it in commit
#2 Yeah I noticed that as well I will have to look into that maybe today or early next week, I can have that message customized for sure, I don't know why it just doesn't show the form again so yeah I will look more into that.
I also plan to test Drupal 11 as well to make sure it works there. So I will have a few more commits I think to add but thanks for the initial review.
Do you see any other features missing that the original module had?
- πΊπΈUnited States NicholasS
@risweb #2 should be fixed now.
Anything else off you notice let me know.
- πΊπΈUnited States risweb
Just tried to test new code and got this error when trying to subscribe to a page:
TypeError: Cannot access offset of type string on string in Drupal\page_notifications\Mail\PageNotificationsMailHandler->buildVerificationEmail() (line 138 of modules/contrib/page_notifications/src/Mail/PageNotificationsMailHandler.php).I uninstalled and then tried to install latest version and it looks like mimemail module is now required to install page notifications module ( page notifications - requires mimemail module.png). Our website is using different module for mail system. But I went ahead and installed mimemail module to test page notifications module. I didn't make any changes to templates in configuration of the module, just left it the way you have it by default.
- Modal window needs X (close) or cancel button.
- Currently page notifications module have confirmation messages and error messages displayed in modal window as well. Your version is using drupal core message. Can we keep the old style with having modal window like in this screenshot page notifications - modal window messages.png
- Not formatted verification email (see attached screenshot page notifications - verification email.png)
- Page not found after clicking on verification link on the email: page notifications - page not found when clicking on verification link.png
I really like the changes you are making and implementing new features and security checks to page notifications module.
- πΊπΈUnited States risweb
Modal window DOES have close button. Sorry, it was black on black and I didn't notice it.
- πΊπΈUnited States NicholasS
@risweb Replying to Comment #17
So after testing with Drupal CMS 1.0 I switched the mail module to "symphony mailer lite" since that seems to be what they went with and is Drupal 11 compatible, Mimemail is not so my sites I guess will have to switch as well.
Replies to:
1. Ok so if the subscriber block is set to a modal, Yeah I can try to get it to have the success message kept in the modal, your right, right now once you complete the modal signup form it just dismisses and the page has the message in it. Not a problem I don't think.
2. I think this was a double HTML escape issue, I also switched to sympohny mailer lite since thats what Drupal CMS choose and I figured the core guys did their research on the best mailer, so see if the most recent version has proper HTML emails.
3. Based on your screenshot page%20notifications%20-%20verification%20email.png is perhaps your "text format" truncating the url, I see the purple text says /verify.... so I think that could be a text format setting issue. Is that the Maximum link text length? Could you test that out an see, none of my testing had truncated links like that. Maybe also this is fixed after I fixed the double escape HTML issue that I mentioned in #2
Thanks for the feedback, I think its getting close!