responsiv / campaign-plugin

[PREMIUM] Send professional campaign messages to your subscribers.
http://octobercms.com/plugin/responsiv-campaign
5 stars 2 forks source link

Launching campaign for a recipient group #56

Closed envas closed 2 years ago

envas commented 5 years ago

I am going to send a newsletter only to registered users and these users have the option to subscribe/unsubscribe a news channel on their account profile page. So I tried to launch the new campaign only for a Recipients Group (defined in my UserProfile plugin via Event hook), e.g. I let the Subscriber Lists in the Campaign launch dialogue unchecked. While adding a Recipient Group to a Subscriber List works fine, a campaign launched only for Recipient Group users lets the subscriber list empty. Is it a bug or expected behaviour?

envas commented 5 years ago

Never mind, it works, the subscriber is visible in the list a bit later, after the campaign has been sent.

envas commented 5 years ago

Anyway, there is still a bug in the plugin when sending campaigns only for a RecipientGroup. Such campaign cannot be duplicated, the error message is

Next Illuminate\Database\QueryException: SQLSTATE[HY000]: 
   General error: 2031 
   (SQL: select * 
                from `responsiv_campaign_lists` 
              where `id` in (?))
    in  ....  /vendor/laravel/framework/src/Illuminate/Database/Connection.php:664

probably because there are no entries in the responsiv_campaign_lists and you try to duplicate the list entry too.

daftspunk commented 2 years ago

This error looks to be a temporary "General error" coming from MySQL. The code itself appears to be working with empty lists. If you still need help with this, let me know.