Skip to Content Skip to Menu

Issue with custom notifications

7 years 3 weeks ago - 7 years 3 weeks ago #297799 by davidmarshall15
Issue with custom notifications was created by davidmarshall15
Hi,

First of all, I know there are some major changes coming with notifications as specified here in the forge

Also as this is a user defined trigger to insert a row into #__comprofiler_activity, I am not expecting any support.

Still I wanted to bring the following issue to your attention.

In this example, I will refer to User A with ID 170 and User B with ID 1706
If the following asset is inserted into the activity table:
Code:
notification.1706.rate2from-170
Both user A and B see the notification

I expect you have already spotted the issue but for clarity the following tests and results:

Code:
notification.1706.rate2from-171
Both user A and B see the notification


Code:
notification.1716.rate2from-170
User A and User B do not see the notification, User with ID 1716 sees it.



Thanks
David
Last edit: 7 years 3 weeks ago by davidmarshall15. Reason: fix forge link

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
7 years 3 weeks ago #297800 by krileon
Replied by krileon on topic Issue with custom notifications
The user that sees the notification is the user specified in the asset of the activity. This is defined as follows.

notification.USER_ID

USER_ID is the user that should see the notification. The owner of the activity is whom the notification is from. Regardless you're trying to use an incomplete feature that will be completely redesigned with its own storage table to better handle notification assignment and also makes it a lot less hard to send notifications to the wrong user, etc..

In short the changes that are coming are a new notification table with 2 new database columns. 1 specifies the recipient user and 1 specifies the read state (this is currently a separate table, but will be removed). Assets would then no longer need "notification.USER_ID" prefixed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

7 years 3 weeks ago #297803 by davidmarshall15
Replied by davidmarshall15 on topic Issue with custom notifications

krileon wrote: The user that sees the notification is the user specified in the asset of the activity. This is defined as follows.

notification.USER_ID


Yes I understand this and to have multiple notifications a suffix need to be concatenated.
The issue is notification.170% matches notification.1706

Anyway I did state I wasn't expecting support, I just wanted to let you know that this has issues: notification.USER_ID%

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
7 years 3 weeks ago - 7 years 3 weeks ago #297805 by krileon
Replied by krileon on topic Issue with custom notifications
That's not an issue. It's working exactly as it's supposed to. It's due to % starting the wildcard location. You should be using the below.

notification.170.%

The wildcard should begin after the first period. The notification.USER_ID is a prefix. This means there should be an asset in addition to it. If you're using only "notification.170" for the asset of an activity entry then the asset of that activity entry is wrong and when the migration code migrates it it won't have an asset at all since "notification.170." will be stripped away.

Edit: Ah, I see what you're saying. There's a bug in the library code it self when converting "notifications" asset to "notifications.USER_ID%". Will fix for next nightly.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 7 years 3 weeks ago by krileon.
The following user(s) said Thank You: davidmarshall15

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum