By shoulders on Friday, 09 March 2018
Posted in Technical Issues
Likes 0
Views 637
Votes 0
Hi,

I am not able to test this fully but the following will make sense.

I did a code comparrision of onsignal enabled only easyblog on a post with komento and onesignal enabled for easyblog and komento.

hen you have onesignal enable both in komento and Easyblog and you visit an easyblog post page you will find that there is only the Komento onesignalcode present. This means the welcomeNotification in the easyblog code will not be sent. and when onesignal is just enabld for easyblog you see the easyblog code.

This coding also shows that you must use a single App for both Komento and Easyblog, you do not have a choice if you want to use Komento for your comments

Easyblog v5.1.15
Komento 3.0.11
Thanks for the input on this, will log this into our issue tracker.
·
Saturday, 10 March 2018 15:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, did you create 2 different apps on Onesignal? You should place the welcome message on both apps
·
Friday, 09 March 2018 23:06
·
0 Likes
·
0 Votes
·
0 Comments
·
I have only created one app. The reason for the 2 app strategy was becasue i wanted people who sign up for comments to get comments, and for people who signed up for new blog posts to only get those notifications.

When you use komento it removes/replaces the Easyblog code which has the welcome message trigger/varible in it.

In easyblog there is an admin setting for the welcome message, in lomento there is not welcome message button and the code is missing from the onesignal javascript it creates.

Onesignal Enabled in easyblog only

<script type="text/javascript">

EasyBlog.require()
.script('https://cdn.onesignal.com/sdks/OneSignalSDK.js')
.done(function($) {

var OneSignal = window.OneSignal || [];
OneSignal.push(["init", {
appId: "6c311751-ea75-4c60-a0d1-e1ee657d6e0d",


safari_web_id: "web.onesignal.auto.6a13c381-7602-4e1d-b2a0-1098f769d9cc",
autoRegister: true,
notifyButton: {
enable: false
},
welcomeNotification: {
"title": "Welcome",
"message": "Thanks for subscribing!"
},

// Popup
promptOptions: {
actionMessage: "We\'d like to show you notifications for the latest news and updates.",
acceptButtonText: "Allow",
cancelButtonText: "No Thanks"
}
}]);


OneSignal.push(function() {

OneSignal.getTags(function(tags) {

OneSignal.push(['sendTags', {
"id": "xxx",
"type": "user"
}]);

});
});
});

</script>


Onesignal enabled for komento and Easyblog



<script type="text/javascript">


Komento.require()
.script('https://cdn.onesignal.com/sdks/OneSignalSDK.js')
.done(function($) {
var OneSignal = window.OneSignal || [];
OneSignal.push(["init", {
appId: "6c311751-ea75-4c60-a0d1-e1ee657d6e0d",

subdomainName: 'https://NjEzNjQ4OGMtMmZiMy00MmRiLWFhMTEtOTQ4MDQyNGZiZjc1',

autoRegister: true,
notifyButton: {
enable: false
}
}]);


OneSignal.push(function() {

OneSignal.getTags(function(tags) {

OneSignal.push(['sendTags', {
"id": "xxx",
"type": "user"
}]);

});
});
});


</script>


The komento code has replace the easyblog code and you can see the welcome message code is missing.
·
Friday, 09 March 2018 23:29
·
0 Likes
·
0 Votes
·
0 Comments
·
I think the problem is onesignal's script is removing one another as our scripts doesn't remove them.
·
Saturday, 10 March 2018 00:15
·
0 Likes
·
0 Votes
·
0 Comments
·
That sounds correct:D . To fix this you would need to add the welcome message option into komento then it does not matter which version of the code is present.

The onesignal code is very busy!
·
Saturday, 10 March 2018 00:38
·
0 Likes
·
0 Votes
·
0 Comments
·
glad to help
·
Saturday, 10 March 2018 17:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks, will lock this thread for now
·
Saturday, 10 March 2018 21:20
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post