rainlab / notify-plugin Goto Github PK
View Code? Open in Web Editor NEWA notification engine for October CMS
License: MIT License
A notification engine for October CMS
License: MIT License
Note, that $code is never defined in this method: https://github.com/rainlab/notify-plugin/blob/master/models/NotificationRule.php#L249
This leads to an immediate crash when visiting the Rules area in backend.
Hello,
I don't know if this is a channel for this, but I'm having a problem with the SaveDatabaseAction action, it has a field called type that it takes from the host and saves, but always saves null, I would like to define this type through my event. It would be possible? the only place I had access to the host was in the construct of the event, but even so it is not affected.
In my plugin on boot()
I have added:
public function boot()
{
\RainLab\Notify\Classes\Notifier::bindEvents([
'rainlab.user.register' => \RainLab\User\NotifyRules\UserRegisteredEvent::class
]);
\RainLab\Notify\Classes\Notifier::instance()->registerCallback(function ($manager) {
$manager->registerGlobalParams([
'user' => Auth::getUser()
]);
});
}
in my component, I have added
Event::fire('rainlab.user.register', [$user, $data]);
But nothings happens,
How I can debug where could be the problem?
Hi Guys,
I recently installed the Notify Plugin and it says that the plugin will be located in Settings > Notifications. However, I do not see any menu item related to notify in my settings panel (neither on the top bar). I checked my the folder structure, and the notify plugin does exist within the Plugins > RainLab > Notify but I cannot locate in my setting panel.
Am I missing something ? Please Help
I see that the goal of this plugin is to streamline the way notifications are delivered which is great. In addition to doing that, I think there would be a benefit to adding a Backend channel out of the box when this plugin is installed. Basically a way by which a user can set up a way by which notifications are delivered to other backend users based on events occurring and this can show up in the top right as a bell icon with numbered badges showing the number of notifications.
I'm assuming this is an MIT license like most of the RainLab plugins. Please confirm.
Every time I click on Notification Rules in backend Settings, it creates another record for "Send welcome email to user". Even clicking on one of the rules and deleting it doesn't help because the moment the screen goes back to the list another record is generated.
My project reported an error: "Undefined variable: host" on line 315 of
I would be good if there was an option to manage the timing of notifications/actions. For instance, sending a reminder 1 month after a user signed up etc.
Hi sorry if I'm mistaken about this, but it seems like ExecutionContextCondition
is not evaluating either the theme
or context
options.
Here is a copy of the current isTrue
function for that:
public function isTrue(&$params)
{
$hostObj = $this->host;
$attribute = $hostObj->subcondition;
$conditionValue = $hostObj->value;
$conditionValue = trim(mb_strtolower($conditionValue));
if ($attribute == 'locale') {
return array_get($params, 'appLocale') == $conditionValue;
} else if ($attribute === 'environment') {
return $conditionValue === \App::environment();
}
return false;
}
I see the context variables isBackend
and isConsole
are made available in Notifier.php
, which could probably be used for evaluating the context
at least...
Or if I missed something please let me know!
EDIT: I do have a patched version of this condition that is working for me if you are open to a PR
When creating a list of actions, it seems that once a new action is added to the list, the previous actions do not remember their selected state. I can't determine yet if this is just in terms of generating the title, or if it is indeed forgetting the state altogether.
1st Action added.
2nd Action added. (note that the first action doesn't have the text anymore, which in this instance is because the field you enter for that action is now null).
3rd Action added. (note that the second action's text has changed)
I just saw this plugin in my backend as "recommendation" so i clicked on it and voila: my backend does not work anymore and throws this error:
Undefined class constant 'CATEGORY_NOTIFICATIONS'
public function registerSettings()
{
return [
'notifications' => [
'label' => 'rainlab.notify::lang.notifications.menu_label',
'description' => 'rainlab.notify::lang.notifications.menu_description',
'category' => SettingsManager::CATEGORY_NOTIFICATIONS,
'icon' => 'icon-bullhorn',
'url' => Backend::url('rainlab/notify/notifications'),
'permissions' => ['rainlab.notify.manage_notifications'],
'order' => 600
],
];
Hello,
When there is an Action with rules, the action is saved when clicking on save in its modal, but when saving the complete notification, it presents a validation error of the action rules again, as if it had not been saved or going through POST along with the saving of the notification.
In v1 this does not happen. The error is giving in v3.
It's also showing an error in action.js, I don't know if it's related, when saving and closing the action modal, before saving the notification, it accuses this error in the console:
Hello,
I wanted to use notify to compose an email message when a user is registered. when when I choose the "compose an email message action" I get an error :
"htmlspecialchars() expects parameter 1 to be string, array given" on line 580 of /vendor/laravel/framework/src/Illuminate/Support/helpers.php
With october 471 with all modules up to dates.
Regards,
Alex
Hello,
When i try to save notification rule from 'User' -> 'Is activated' -> Compose a mail message, i choose to send notification to all administrators, i save the rule, and when i save the notification, i get error "The mail template field is required",
When i return to the "Compose a mail message" form, i don't find the data stored.
Hello.
Hello,
How can make an action class with a repeater type field?
"Unexpected type of array when attempting to save attribute "repeater_field", try adding it to the $jsonable property." on line 751 of /site/vendor/october/rain/src/Database/Model.php
Hello.
Have you got any more examples of how to use RainLab.Notify, please?
I'm interested in creating my own notifications, but you have an example for users only. I am confused and don`t understand anything.
Where can I see examples of how to write notifications from scratch using your plugin?
The ConditionBuilder formwidget changes the $_POST superglobal in L351 and L356 but due to this change in https://github.com/octobercms/library, the $_POST superglobal can't be changed directly anymore. So, the value field is not saved. This could be changed here too in order to fix it:
Insted of:
$_POST['condition_data'] = $cache;
Now should be:
$requestData = Request::all();
array_set($requestData, 'condition_data' , $cache);
Request::merge($requestData);
Hello!
I've just installed the notify plugin and I tried to create a new notification rule.
On actions, if I choose the "Store in database" option I get an "Invalid argument supplied for foreach()" on line 89 of /plugins/rainlab/notify/notifyrules/SaveDatabaseAction.php error.
If I choose the "Compose a mail message", everything work as expected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.