Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Yes, thanks for bumping, I'm working on this right now. My idea is to move all the module config to entities so the user can create a new entity that contains the conditions and messages as any other content on the site.
I'd avoid using a regular node entity (like alertbox does) to avoid the overhead that comes with nodes. Instead I'd use a custom content entity.
There is one advantage on having a node, that is that we can enable scheduling using existing solutions for nodes. Not sure if you have scheduling on the backlog?
Perhaps you could create a clone on GitHub so we could follow up this feature and contribute there, wdyt?
Great, thanks for pointing out about scheduling. It wasn't something in my mind. I've done it as content entity indeed, it's still much of a work in progress, some code is pushed to the development branch some still to go as it matures. I'll gladly accept contributions once it gets a bit more stable!
It's ancient but it largely seems to cover the same use cases. Note that it's also providing a custom content entity and (I haven't looked yet to the code for it) but it claims to support scheduling through scheduler.
Off topic:
- Something that could be improved perhaps is the use of Condition API to enable visibility configuration similar to block UI;
- I noticed some caching issue we may need to solve (we plan to use this in combination with Varnish);
I'll open issues if I get to spend some more time on this.
Hello, @mmp @SocialNicheGuru
Thanks for the suggestions, they are helpful.
Just to update you on this, most of the rewrite is done but still not functional for a release. On the next week or two we should have minimally functional features and then do incremental updates from there. Will keep you posted.
Released a new version alpha5 with the ability to configure multiple messages.
Mind that the old configuration form was not deleted and you can check there your configurations but you'll have to create new messages for it to work. The deprecated forms will be deleted on the next releases.
Consider that this is alpha code and there will be usability improvements but please feel free to open another issue if you find functionality related issues. I'm closing this as fixed.
Thank you for your ideas and support on this issue!
Comments
Comment #2
wranvaud commentedThank you! This is in the road-map, should be implemented soon
Comment #3
mpp commentedHi @wranvaud, any update on this?
Comment #4
wranvaud commentedHi, development has been slow lately but I want to get back to it now. I hope to get some energy into this soon, thanks for bumping!
Comment #5
mpp commented@wranvaud,
We'd probably need a custom entity to do this or what did you have in mind to store the different messages?
Comment #6
socialnicheguru commenteda cm_message entity to hold the different messages could work.
Comment #7
wranvaud commentedYes, thanks for bumping, I'm working on this right now. My idea is to move all the module config to entities so the user can create a new entity that contains the conditions and messages as any other content on the site.
Comment #8
mpp commentedHi @wrvanaud, thanks for the update on this!
I'd avoid using a regular node entity (like alertbox does) to avoid the overhead that comes with nodes. Instead I'd use a custom content entity.
There is one advantage on having a node, that is that we can enable scheduling using existing solutions for nodes. Not sure if you have scheduling on the backlog?
Perhaps you could create a clone on GitHub so we could follow up this feature and contribute there, wdyt?
Comment #9
socialnicheguru commentedFor simplicity and future expansion I would stick with nodes.
Comment #10
wranvaud commentedGreat, thanks for pointing out about scheduling. It wasn't something in my mind. I've done it as content entity indeed, it's still much of a work in progress, some code is pushed to the development branch some still to go as it matures. I'll gladly accept contributions once it gets a bit more stable!
Comment #11
mpp commented@wranvaud, did you have a look at this project: https://www.drupal.org/project/user_alert
It's ancient but it largely seems to cover the same use cases. Note that it's also providing a custom content entity and (I haven't looked yet to the code for it) but it claims to support scheduling through scheduler.
Off topic:
- Something that could be improved perhaps is the use of Condition API to enable visibility configuration similar to block UI;
- I noticed some caching issue we may need to solve (we plan to use this in combination with Varnish);
I'll open issues if I get to spend some more time on this.
Comment #12
wranvaud commentedHello, @mmp @SocialNicheGuru
Thanks for the suggestions, they are helpful.
Just to update you on this, most of the rewrite is done but still not functional for a release. On the next week or two we should have minimally functional features and then do incremental updates from there. Will keep you posted.
Comment #13
mpp commentedThanks for the update @wranvaud!
Comment #15
wranvaud commentedReleased a new version alpha5 with the ability to configure multiple messages.
Mind that the old configuration form was not deleted and you can check there your configurations but you'll have to create new messages for it to work. The deprecated forms will be deleted on the next releases.
Consider that this is alpha code and there will be usability improvements but please feel free to open another issue if you find functionality related issues. I'm closing this as fixed.
Thank you for your ideas and support on this issue!
Comment #16
mpp commentedHi @wranvaud, thank you very much for the update!
Comment #17
wranvaud commentedComment just to add credit where it is due, for some reason @SocialNicheGuru didn't get the credits for this issue the first time. Thank you!