Comments (20)
i had same issue with automatic user activation by sending mail...
Something wrong with UserPlus plugin, it seems that some notification rule is created by the plugin without any rule_conditions...
Temporary solution would be to disable UserPlus plugin and disable Rain.notify plugin, but enable back notify plugin , all from backend...
This worked for me... wasted couple of hours searching though
from notify-plugin.
No idea @w20k, I haven't actually used this plugin
from notify-plugin.
@LukeTowers, I was thinking to add additional validation based on the number of rules or if the repeater is empty.
I agree! The message is definitely confusing. I've added this task to my ToDo List.
from notify-plugin.
same problem
from notify-plugin.
@saulo-silva are you using the UserPlus plugin as well?
from notify-plugin.
Also has got this. Seems it's caused by uncompleted deferred binding of rule_conditions. First I was getting only rule_conditions records without rule_host_id. I'm not sure, but seems I've fixed this by resaving the notification rule in backend
http://prntscr.com/lqie4u
from notify-plugin.
If someone can narrow down a cause and submit a PR to fix it that would be helpful.
from notify-plugin.
@BahodurSaidov, could you provide a simple example of how to reproduce it?
from notify-plugin.
@w20k, i think you should be able to reproduce with build 446 install User & UserPlus plugin. Then enable registration, from User settings select activated by user (send link to mail).
Also, during this issue, i was deleting test user several times from backend and re-registering so to get test activation mail...
It should be mentioned that when the problem exists, the mail with activation link is NOT sent after registration form, and an exception is thrown at frontend with flash messaging saying something with "notification rule...".
This much I remember... Hope it helps...
Please let know if you could reproduce the issue by following these steps...
from notify-plugin.
Side note: by default, if you use the built-in notification rule - email template is wrong.
@BahodurSaidov, mail template naming should fix your issue.
from notify-plugin.
Hi! Im from Russia, but you can translate my text:
Проблема решается очень просто, заходим в файл plugins/rainlab/notify/models/NotificationRule.php
и комментируем строки 71-77
// if (!$rootCondition) {
// throw new ApplicationException('Notification rule is missing a root condition!');
// }
// if (!$rootCondition->getConditionObject()->isTrue($params)) {
// return false;
// }
Отключив эту проверку, ошибка высвечиваться не будет, но плагин работает корректно
from notify-plugin.
@web-studio-51, интерестно зачем вообще добавили ApplicationException туда ?!
from notify-plugin.
Wait, @LukeTowers, could you clarify one thing. Should notify-plugin rules work without defining a single condition?
Finally understood what's the issue is present here 😃
from notify-plugin.
Darn, @LukeTowers, same for me. Used it few times, but with rules.
from notify-plugin.
@amjadniazi48, @saulo-silva, @vdomah, @web-studio-51, @BahodurSaidov, for your information.
Will be closing this ticket. As I've understood from the code base, the plugin doesn't support cases where only a root condition is enabled.
You need to specify one or more conditions.
And if it's not the case, please open a new ticket with description and steps to reproduce.
As for hacks: @web-studio-51
If you want to have this supported in the core of this plugin - Feel free to make a PR.
Or an error showing that single conditions should be added.
from notify-plugin.
@w20k I think this needs to be corrected with an improvement to the error message. In this case the user has a root condition, but no actual subconditions to evaluate, thus the message is incorrect and confusing.
from notify-plugin.
Will re-open until the message gets improved.
from notify-plugin.
i had same issue with automatic user activation by sending mail...
Something wrong with UserPlus plugin, it seems that some notification rule is created by the plugin without any rule_conditions...
Temporary solution would be to disable UserPlus plugin and disable Rain.notify plugin, but enable back notify plugin , all from backend...
This worked for me... wasted couple of hours searching though
Faced problem with error message "Notification rule is missing a root condition", tried solution explained above. But turned out, in this case, I can't create notification rule at all. After enabling UserPlus again and hit "Notification rules" in settings area I got fresh default rule with wrong template naming "welcome". And I can't create a new rule because of that.
And every time I hit "Notification rules" in settings I got fresh default rule over and over again. Something similar was discussed here: #3
Tried to reinstall all related plugins: UserPlus, Location and Notify. Not helped.
Environment:
Ubuntu 17.10
php 7.1
Build: 446
from notify-plugin.
I also get this error message "Notification rule is missing a root condition". In my case, I found that I had only one rule in the "Notification rules" settings with root condition but two records in the "rainlab_notify_rule_conditions" table with the same class name. So, when the Notifier class fires the event it founds two records, one with root condition but another one without root condition and triggers the error. I think that one of the records was still there because a failed delete action or something. When I deleted this record the issue was fixed.
from notify-plugin.
Fixed by #18
from notify-plugin.
Related Issues (20)
- QUESTION - Help with Event::fire and sending email HOT 4
- Conditions not saving the value field HOT 3
- I cannot save notification, i get "The mail template field is required" HOT 19
- Plugin interface not showing up in the settings area HOT 3
- ActionBuilder widget does not remember state of previous actions HOT 1
- How set host type in SaveDatabaseAction HOT 1
- Action class with repeater type field HOT 3
- I need more examples HOT 7
- Creates duplicates every time you view settings HOT 2
- [Feature Request] October Backend channel HOT 1
- Can't "Compose an email message" when "A user is registered" HOT 2
- The ModelAttributesConditionBase file may have errors on line 315 HOT 1
- Error on create notification condition HOT 4
- Can't create new notification, "Add Notification Rule" form is empty HOT 2
- Validation error when saving a notification with action with validation HOT 2
- Error on new notification rule creation HOT 1
- ExecutionContextCondition not evaluating 'theme' and 'context' conditions? HOT 1
- MIT License? HOT 2
- Manage timing of notifications HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notify-plugin.