Hello,
I've made a plug-in for my company, that work fine but there is still a problem. I have notification issues that i don't understand. On a specific object creation, a notification is made, and the text is correct : "Benaesan a créé le tableau test il y a 6 minutes" . The first link works well, but in the second one the href is the home page of my site and not the object's url.
If someone have an idea, i'll take.
Thank by advance
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Benaesan@benaesan
Benaesan - 0 likes
- iionly@iionly
iionly - 0 likes
- Benaesan@benaesan
Benaesan - 0 likes
- iionly@iionly
iionly - 1 like
- Benaesan@benaesan
Benaesan - 0 likes
You must log in to post replies.Really, no one?
Not enough information to give any advice.
For the cited text I guess you are asking about the links in the title line of a river entry (activity page) and not about (site) notifications. Or am I wrong?
If it's a river entry that has a wrong link, what's the code snippet (elgg_create_river_item() arguments) you use? Is the object_guid wrong here. And what about the river view corresponding to the created object? Are you sure you have no error there - what is the code of the view?
Or is it really a notification you are asking about? Have you added any code for handling of the notification content then? If so, what's the code?
Thanks for the reply. I have fixed some of my problem.
so the river have the right content,
But in notification(By mail or by the notifier plugin) the text is
That seem to be a generical text, I don't understand why.
In my Log file
It's best to use add a notification handler function to be able to set up the notification text for on-site and email notifications as you want it to be. If the handler functions is not added, Elgg most likely uses some fallback option to send out notifications that might not be fit 100% in all cases.
As a sidenote: for the river entries you would have to add a language string to the language file(s) of your plugin with the subtype of the object created in the key like
with the %s placeholders which will get replaced by the user's name and the link to the new content item.
As for the notification handler you can look for example in start.php of the blog plugin or other plugins how to register for the notification event (in your case the "create" event) and how to add the notification handler function. In the init function you would add
And then the function
You also need to add the language strings used in the handler function.
Hello,
Sorry for the delay, I've been on a big project and I didn't take time for respond. So after some experiment All of this work. But in a first time the link within the notification doesn't work. I've had to add :
And now everything works. Thanks a lot