Shop Forums WordPress Plugins digest / private bridge conflict

Viewing 7 reply threads
  • Author
    Posts
    • #6035
      Julia Reyes
      Participant

      Vinny,

      Having the problems below now. These are the versions of the plugins I have installed: Private groups bridge – 1.2;
      opt-out – 1.5;
      digest – 1.9;
      bbpnns – 1.15.5;

      1) User is set to receive global notifications (no specific subscriptions set). User enables daily forum digest and ‘still get notified…’.
      Outcome: Receives instant notification on ALL posts. (Bad, receiving notification on forum he is not part of).

      2) User opts out of global notifications. Digest is enabled and is subscribed to specific forums.
      Outcome: User does not receive a digest, even when there is activity on his specific subscriptions.

    • #6036
      Julia Reyes
      Participant
      This reply has been marked as private.
    • #6039
      vinny
      Keymaster

      Thanks for the detailed explaination, Julie. I’m working on making them all work well together.

    • #6040
      vinny
      Keymaster

      Ok, so this is what I’m seeing…

      1) User is set to receive global notifications (no specific subscriptions set). User enables daily forum digest and ‘still get notified…’.
      Outcome: Receives instant notification on ALL posts. (Bad, receiving notification on forum he is not part of).

      I’ll fix this by increasing the priority of the Private Groups Bridge filter to make it greater than the digests. This will result in the Private Groups Bridge removing the recipients from the list after the Digests have done their thing.

      2) User opts out of global notifications. Digest is enabled and is subscribed to specific forums.
      Outcome: User does not receive a digest, even when there is activity on his specific subscriptions.

      This I can’t replicate as the Opt-out runs with priority PHP_INT_MAX (the maximum possible priority, after Digests and Private Groups have run). It does not touch subscribers, though. It captures all subscribers for the forum/topic and checks if a) they have opted out globally, and b) if they are not in the subscribers list and only then removes them from the list.

      Can you double-check this scenario after applying the fix for issue 1 (which will be made available momentarily)?

    • #6044
      Julia Reyes
      Participant

      Hi Vinny,

      Just to be clear:
      #1 – with the fix both the digest and the instant notifications should filter out the groups the user is not allowed to see?
      #2 – are you saying that it works for you? Could you point me to somewhere in the code I could troubleshoot? The records in fact, do appear in the table for me appropriately and are cleared after the digest is run. The digest is just not sent..hmm..

      Also, I don’t see any update for the bridge. I’ve hit the check for updates several times and my keys say “activated”…

    • #6045
      Julia Reyes
      Participant

      Vinny,

      Regarding #2. Trying to do some testing. I have only one user receiving notifications set to:

      Enable Forum Digests (Daily)
      Enable Instant Notifications
      Disable Global notifications

      They are subscribed to the new topics in 1 forum.

      I’m working on the file:
      bbpnns-opt-out/includes/controller/recipients.class.php in the function filter_recipients.

      When the new topic is created: $this->subscribers[$recipient_id] is set (looks like to 0).

      When the digest is run, $this->subscribers[$recipient_id] is NULL, thereby removing the user from the list, even though they do in fact have subscriptions.

      That’s as far as I could get. I don’t understand where $this->subscribers comes from (purely, due to my lack of PHP knowledge) and why it’s different on the instant notifications vs the digest.

    • #6046
      vinny
      Keymaster

      #1 – with the fix both the digest and the instant notifications should filter out the groups the user is not allowed to see?

      Yes.

      Also, I don’t see any update for the bridge. I’ve hit the check for updates several times and my keys say “activated”…

      You’ll find the update available now. The update api plugin is ‘tricky’ to say the least. There is a bug that I’ve already reported and it got me. I’ve applied the workaround.

      due to my lack of PHP knowledge

      You sure could have fooled me 🙂

      So, $this->subscribers comes from the filter bbpnns_core_subscribers, which is applied in bbpnns. It passes the $subscribers array which was fetched either by bbp_get_topic_subscribers( $topic_id ) or bbp_get_forum_subscribers( $forum_id )

      Because it is an array of user_ids, I call array_flip so I can have the IDs as keys of an associative array – it is faster/easier to check for isset() on an associative array than to traverse the whole array looking for IDs. The actual value doesn’t really matter, unless it’s null, which isn’t the case.

      When the digest runs (meaning sends out emails), it shouldn’t even be hitting that code, but if it is, it doesn’t matter. It only cares about what is in the notification queue table. The enqueuing of the message in the table is done when the new topic/reply is created.

      I hope that clarifies it. If you still have problems after updating the Private Groups plugin, let’s do a skype chat so you can show me your checks and even more details of what’s happening and what you expect.

      I’ll send you my skype name via email.

      Cheers,
      Vinny

    • #6051
      vinny
      Keymaster

      I’ve released Digests 1.9.1 with a fix for the Opt-out conflict that we discovered during our Skype session. I’ll close this as resolved.

      Cheers!

Viewing 7 reply threads
  • You must be logged in to reply to this topic.