• Ran into some problems using the plugin. When publishing a new post a critical error occurs. The post is still being published but no notifications work.

    Here are a few lines from the error log:

    [16-Aug-2024 11:04:58 UTC] PHP Fatal error: Uncaught DomainException: Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc in /var/www/domains/dokkarit.fi/www/wordpress/wp-content/plugins/push-notification-for-post-and-buddypress/vendor/google/auth/src/ApplicationDefaultCredentials.php:195
    Stack trace: 0 /var/www/domains/dokkarit.fi/www/wordpress/wp-content/plugins/push-notification-for-post-and-buddypress/vendor/google/apiclient/src/Client.php(1247):

    • This topic was modified 3 months, 2 weeks ago by GaianHuuto.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Murali

    (@murali-indiacitys)

    It is due to invalid service account file uploaded or service account file not uploaded for httpv1 firebase push notification. Please turn on Firebase httpv1 notiification

    From firebase console under service account tab (of your project), generate new key pair and it will download the service account file. Please upload that file using choose file option near httpv1 notification as shown in below attached image

    Firebase push notificaton will work only when valid service account file uploaded please use instructions in admin page how to download firebase api httpv1 service account file from Firebase console.

    Apart from above, Also make sure you fill are required firebase web app credentials in below fields after httpv1 notification along with public key (web push certificate key pair)

    • This reply was modified 3 months, 2 weeks ago by Murali.
    Thread Starter GaianHuuto

    (@gaianhuuto)

    Thank you. The above issue was solved. However, I’m using a video platform that has integrated BuddyPress features but for example the BuddyPress user account managed is not available, do you have as suggestion how I configure or get the subscription page for the notifications to show?

    Plugin Author Murali

    (@murali-indiacitys)

    By default, all users are subscribed to all notifications, if your code uses same BuddyPress hooks (add_action) then plugin will use those hooks to trigger notifications for new activities, comments, private messages extra , if you see below code plugin uses BuddyPress’s hook bp_activity_posted_update to trigger push notification after activity is posted, similarly for group, it uses bp_groups_posted_update to trigger group activity push notification. Similarly plugin uses various hooks from BuddyPress and WordPress post to trigger push notifications. (as show below code screenshot)

    If your code uses same hook like BuddyPress then you will get notification. If front end user wants to control push notification, if your code uses same settings then front end user settings will be available if front end push notification option is enabled in plugin admin (under front end tab).

    If your code uses different hooks or different code for front end settings then it requires custom coding according to your code and for front end settings i can create shortcode.

    Alternate option to control frontend settings is turn on custom prompt and click on customize button turn on bell prompt option and also turn on push notification subscription options to show various options in bell prompt for frontend users to turn on or off various push notifications

    Please check in device token plugin admin tab to see whether you received device token with default subscription 10000000000000 , first byte indicates user subscribed to all notifications, it is explained in device token tab in bottom. (i have attached screenshot below showing device token tab with subscription options).

    //Push notification(if enabled) for BuddyPress new acitivities based on plugin settings
    add_action('bp_activity_posted_update', array($this, $this->pre_name .'icforum_push_notifications_web'), 5, 3 );

    //Push notification(if enabled) for BuddyPress new acitivities under group based on plugin settings
    add_action( 'bp_groups_posted_update', array($this, $this->pre_name .'icforum_push_notifications_web_group'), 1, 4 );
    Thread Starter GaianHuuto

    (@gaianhuuto)

    Thank you. Now the push-notifications work. One problem though. I’m using StreamTube-theme and I’m not aware how the BuddyPress integrations are made in that theme. However, after the initial subscription of notifications – which is displayed on the front page – I can’t find any page where the subscriber can change their settings… Is there a way do this manually on any given page?

    Thread Starter GaianHuuto

    (@gaianhuuto)

    Okey, I figured out how to do this via shortcode. Now the problem is the style. Changing colors from the plugin settings does nothing.

    Thread Starter GaianHuuto

    (@gaianhuuto)

    And yet one more thing. I activated the bell prompted. Is it possible to have it show up only on the front page?

    • This reply was modified 3 months ago by GaianHuuto.
    Plugin Author Murali

    (@murali-indiacitys)

    At present plugin code is designed to have bell prompt to appear in all pages. If you require to hide in specific pages, please create your own javascript using jquery using <elementclass>.hide or show command to hide/show this prompt according to page urls.

    I will try to add hide option from admin page in next release to show only in home page.

    Plugin Author Murali

    (@murali-indiacitys)

    Are you using this shortcode subscribe_PNFPB_push_notification for push notification subscription and bell prompt also has frontend push notification subscription option, it can be turned on under bell prompt options that will have text, color options.

    Bell prompt with frontend subscription option turned on last option, so that bell prompt will have all control along with subscription option. No need to use shortcode.

    shortcode is designed using jquery dialog, i added only text customization under customize button tab but in bell prompt it will have text color option, background color, subscription option text customization extra after last option below , turn on show subscription option button in bell prompt and after this option, it has all options to customize color, text extra.

    Thread Starter GaianHuuto

    (@gaianhuuto)

    I am only using bell-prompt – no shortcodes. Thank you for your answer. I will be waiting for the update.

    • This reply was modified 3 months ago by GaianHuuto.
Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.