- Issue created by @NicholasS
- Merge request !3Modify to exit immediately if no files on entity, prevents warnings after fresh install β (Open) created by NicholasS
- πΊπΈUnited States NicholasS
Ok now when trying to save /admin/page-notifications/tabs/default/second after install I got a
The website encountered an unexpected error. Try again later. Error: Class "Drupal\page_notifications\Form\Drupal" not found in Drupal\page_notifications\Form\MessagesForm->submitForm() (line 265 of modules/contrib/page_notifications/src/Form/MessagesForm.php). call_user_func_array(Array, Array) (Line: 129) Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 67) Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
- πΊπΈUnited States NicholasS
I love the idea of this module, but man.... I can't get it working and been browsing the code and its full of areas that need work, lots of unused variables and comment blocks. I assume maybe this was a custom module at one point? I am going to look over it for a few days and see if I have the capacity to refactor it.
Any Maintainers want to chime in is this module useable in its current form? Seems not to be.
- πΊπΈUnited States NicholasS
#3 seems to be a cache issue, tried today and was able to save the configuration page,
however it all seems hardcoded to
full_html
and our site had removed that text format. The dropdowns on the configure page allow me to select another format, but on each save it reverts back tofull_html
- πΊπΈUnited States risweb
Thanks nicholass for looking into this. I will test the code soon and add new release.
- πΊπΈUnited States NicholasS
@risweb - Thanks for the module, I saw someone else brought up the custom entity type, instead of how its currently designed to use a node and fields to manage subscriptions. I am just curious has that been working out for your sites? It seems it would generate a lot of nodes, and playing around with the confirmation page such as
/page-notifications/confirmation/XXXXXX/27956-node-XXXXXX
seems a bot can spam that generating a lot of fake node/subscriptions.I am currently still looking at it all locally, but more I review I feel like this module needs a new 4.x release where a lot of it get refactored with good dependency injection, XXS and validation. Would that be something your open to supporting?
- πΊπΈUnited States NicholasS
I think I would be willing to refactor this in a 4.x branch and would propose the following: (Just from initial skim of code)
- Increase Dependency Injection, removing static calls such as `\Drupal::`
Convert to a custom entity type, and provide migration path from nodes
Use Drupal Config management for settings instead of the database to store module/templates, was there a reason for using the database I'm not aware of?
Instead of fields being manually added, I think it should be more automatic, and really I think you just need a checkbox for the editor, and can use revision log message field for the short editor note? Id have to dive into more why you need a timestamp field.
Various token/email validation improvements like token expiration, cron cleanup, also don't love the email in the address bar which would then show in server logs, I feel it could be an obscure ID that relates back to an email.
Do you have any strong opinions on any of those?