Giter VIP home page Giter VIP logo

craft-campaign's Introduction

PutYourLightsOn – Craft CMS Plugins

Liberate your website

Enterprise-class plugins for ridiculous speed, streamlined email marketing and actual security. We develop both commercial and free Craft CMS plugins, as well as providing custom plugin development and training.

Visit us at putyourlightson.com.

Monkey

craft-campaign's People

Contributors

andreasbecker avatar bencroker avatar kennethormandy avatar kringkaste avatar phoob avatar robinbeatty avatar saboteur777 avatar scandella avatar vnali avatar watarutmnh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

craft-campaign's Issues

When synced users change email, a new contact is created, with only the synced mailinglist subscription activated

Steps to reproduce:

  1. Create a user group with some users
  2. Create a couple of mailing lists, and make one of them sync with the user group
  3. Add some additional subscriptions to a user
  4. Change user's email

Expected outcome:

The synced user's campaign contact's email is changed, and all subscriptions are kept.

What happens:

  • a new contact is created, which is synced to the synced mailing list (and only that list).
  • the now "orphan" contact is kept, with all subscriptions, except the synced mailing list. This contact's email will probably stop working, the contact will bounce, and the new address won't get the expected emails.

Makes sense?

Regards,

Peter

Question/Feature Request: Customize 'Verify Email' subject

I'm working on a bilingual site.

I've successfully translated the 'Verify Email' content, but the subject is always 'Verify your email address' (English).

I couldn't find anywhere this was set, and I think it seems to be hard-coded here:
https://github.com/putyourlightson/craft-campaign/blob/v1/src/services/ContactsService.php

Is there a way to customize the email subject, or would that be a new feature?
Ideally for my site, I'd like a different subject for each locale, but having both English and French in the subject line would be OK, too.

PHP error when sending test mail from settings panel

Hello!

When I press the button "Send test mail" in the email settings panel, using the "sendmail" transport type, I get a PHP error saying "Undefined offset: 0" highlighting the line:

->setFrom([$settings->fromNamesEmails[0][1] => $settings->fromNamesEmails[0][0]])

Best regards and thank you for your support!

Automated sendouts via cron job not working

When trying to automate email sendouts via the Automated Sendout Type and cron job, the cron job does not successfully trigger the jobs queue to run. The cron job command is as written in the docs/settings: wget http://mywebsite.com/actions/campaign/sendouts/queue-pending-sendouts?key=HcNHpvyqclSQyVRb&run=1 >/dev/null 2>&1. Executed on Linode/Forge at an interval of every 1 minute.

If I hit that URL from a browser that is logged into Craft, the jobs queue will run as expected and any queued emails will be sent. However, if that URL is hit from a browser / server that is not logged into Craft (where the cron job is executed for example), the jobs queue will not run.

I interpreted the docs to mean thatrunQueueAutomatically should be set to false in order for the jobs queue to only run when triggered by the cron job. However, I tried runQueueAutomatically both true (default) and false, without luck.

I am currently only trying to send 1 email every 10 minutes, so I suspected I'm not hitting any batch thresholds. I am also currently in test mode, but I experienced the same issue when sending live emails.

Any help is greatly appreciated!

Versions:
Craft 3.0.21
Campaign 1.1.9
Campaign Pro 1.0.0
Server- Ubuntu 16.04.3 / Linux 4.15.13

Sendout appears stalled if sent two multiple mailing lists, and contact has bounced on just one of them

I first sent out a campaign to two mailing lists in one sendout (many of the subscribers appear on both lists). Some of them bounced. But after handling the bounces, I registered that the bounces were only registered for one of the lists.

The next campaign that went out to the same two mailing lists appeared stalled (went back to pending, saying some mails were left unsent) after sending to all contacts. After inspecting the remaining users, I realized that the ones that remained in the sendout queue were ones that had been bounced in one of the lists, but not the others.

I guess this problem occurs in part because bounces are written to the database both in campaign_contacts, contacts_campaigns and contacts_mailinglists.. maybe bounces should only be registered to - or at least retrieved from - the contact itself?

My solution right now a to run a few sql queries to sync bounce status for all mailinglists based on the status in the contacts model..

Regards, Peter

Send to single email

I understand it is currently possible to send to an individual mailing list Is there a method to send to individual email addresses? Or a workaround to make that possible? For example selecting all mailing lists and then only including an email address.

Postgresql case sensitivity issue

Hi

The plugin is not working at all under postgresql database:
https://stackoverflow.com/questions/20878932/are-postgresql-column-names-case-sensitive

Example:

SQLSTATE[42703]: Undefined column: 7 ERROR: column campaign_mailinglists.mailinglisttypeid does not exist
LINE 5: ...ilinglisttypes" ON campaign_mailinglisttypes.id = campaign_m...
^
HINT: Perhaps you meant to reference the column "campaign_mailinglists.mailingListTypeId".

Can you fix this, we are planing to use this plugin

Thank you

Sendouts fail because of invalid emails

My sendout just reported `Failed Sending to ***@icloud.ocm failed. Please check your email settings."

Maybe instead of halting the entire sendout there could be a check that simply skip invalid emails and continue sending without requiring a manual resume?

Feature request: premailer support

The Campaign plugin is great, but we're running into an issue whereby the client wants to create content in rich text (i.e. Redactor) fields on the Campaign.

Given that we need to use inline styles to get a good support of HTML emails across different email clients, is there any way we can use a premailer library (e.g. https://github.com/crossjoin/PreMailer) to process a stylesheet into inline styles before the email is sent out?

This may mean providing a means whereby we can use some form of plugin with Sendouts and test emails.

Add Multi-Site Functionality

Functionality planned for better multi-site functionality in version 1.4:

  1. Ability to define multiple "from name" and "from email" combinations in Settings > Email Settings. Only pre-defined name-email combinations will be available on the sendout edit page.
  2. Campaign Types will get a site settings table in which individual sites can be enabled/disabled and each receive unique templates, as in the section settings.
  3. Mailing List Types will get a site settings table in which individual sites can be enabled/disabled and each receive unique templates, as in the section settings.
  4. The edit sendout page will get a site select field which based on the site selected will determine which campaign types and mailing list types can be selected.

Please refer to the feature numbers above when giving feedback.

Segment index fails to list segments after the first one has been created.

When the CP tries to fetch from "?p=admin/actions/element-indexes/get-elements" a 500 error is returned: "Class 'putyourlightson\campaign\services\Db' not found"

I created a new segment with a name and a rule that selects all users created after 01.01.2019. This causes the listing at /admin/campaign/segments to fail.

Probably just a missing import, but I could not locate where it's missing from the error message.

Can you create a campaign programmatically?

Is it possible to create campaigns programmatically like you can with contacts (i.e. using $contact = new ContactElement();)? I'm building a newsletter that needs to take its content from an Entry rather than simply creating new Campaigns. So I was thinking I could write a plugin that converts an Entry to a Campaign rather than having to copy/paste.

Sendouts fails to complete if there are emoticons in htmlBody

We've encountered an issue where sendouts fail to achieve sent state. It's likely because the insertion of htmlBody in craft_campaign_sendouts fail when the html contains certain emoticons.

To replicate try using camera with flash 📸 or tangerine 🍊. Umbrella and the older ones seem to work fine.

2019-01-27 18:05:07 [-][276][-][error][craft\queue\QueueLogBehavior::afterError] [6938] Sending "Nyhetsbrev 2" sendout [batch 5] (attempt: 9) - Error (time: 0.309s): SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x93\xB8 <...' for column `craftcms`.`craft_campaign_sendouts`.`htmlBody` at row 1

Exception 'Error' when calling run-pending-sendouts from console

I get an error when calling the run-pending-sendouts task:

php craft campaign/sendouts/run-pending-sendouts

0 pending sendout(s) queued.
Exception 'Error' with message 'Class 'putyourlightson\campaign\console\controllers\ExitCode' not found'

in /var/www/vendor/putyourlightson/craft-campaign/src/console/controllers/SendoutsController.php:40

Stack trace:
#0 [internal function]: putyourlightson\campaign\console\controllers\SendoutsController->actionRunPendingSendouts()
#1 /var/www/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#2 /var/www/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#3 /var/www/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('run-pending-sen...', Array)
#4 /var/www/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('run-pending-sen...', Array)
#5 /var/www/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('campaign/sendou...', Array)
#6 /var/www/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('campaign/sendou...', Array)
#7 /var/www/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#8 /var/www/craft(22): yii\base\Application->run()
#9 {main}

php -v

PHP 7.2.12 (cli) (built: Nov 28 2018 22:58:16) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.12, Copyright (c) 1999-2018, by Zend Technologies

Feature request: Approve mailing list membership (moderate requests)

Hello!

We have some «privileged mailing lists», where we would need to approve subscription requests. Right now this is solved by people writing us an email applying for membership. But it would be great if it would be possible to do this via this plugin.

Basically, I would like there to be an option in mailinglist type settings to – in addition to mark a mailing list type as double opt-in – to have an additional radio button:

*Moderate subscription requests*
Whether a subscription request need to be approved by a mailing list moderator.

Feature request: subscribing to multiple mailinglists in one form

Hello!

We have a subscription form where we allow users to sign up to multiple mailinglists. We implement a logic that sends one request per mailinglist to the plugin. You can see the implementation here (in norwegian): https://dfo.no/kundesider/kundenotater/abonner-pa-kundenotater

The problem is, the user receives one verification email per list (both have double opt-in), and s/he have to click the links in both emails to get signed up. It would be nice if the plugin could have better support for these use cases.

Error upon opening campaign

After making a new campaign I seem to be unable to save the campaign except for when I have the preview window open. Even though I get an error it still saves and I can use the campaign for sendouts. However when I try to reopen the campaign to edit something I get the following error.

afbeelding

I was wondering what could be causing this issue.

EDIT:
by removing the 'clicked desc' part in ReportsService.php:235 it works as intended. However i'm not sure what this might break in the future.

Question: If I have to manually map a field on import will it fail in Sync?

So I have a few fields named with an ampersand

For example 'Egg & Sausage' and field handle would be eggSausage

The field was added to Contact Settings

In initial import for users to contacts I have to manually map the field as it doesn't automatically pick it up. Other fields are fine

My concern is that now that I have set up a Sync, that this field will not update correctly if it didnt catch it in Import.

Would I have reason to be concerned?

Support for multisite / languages

Need the ability to create campaigns on multiple languages using dynamic content via entry fields to populate the mail-templates on the correct language.

Feature request: imap bounce handling

Hello! I emailed you a while back about the possibility for using IMAP to check bounces. I have now created a craft module that accomplishes this. Maybe this could be implemented in your plugin somehow? (only thing is it depends on the php imap module, which is not a core craft requirement)

https://github.com/phoob/campaignbouncehandlermodule

As stated in the README, it requires the php IMAP module and https://packagist.org/packages/voku/bounce-mail-handler

Syncing craft users to mailing lists doesn't work

Steps to reproduce

  1. Allow public registrations and assign any registrations to a default group
  2. Sync default group with Campaign
  3. Register user via frontend (the user is activated)

Expected result: Registered user should appear in synced Campaign group, but does not.

Actual result: I did notice now that the user is synced as a contact in Campaign, but it's incomplete, because the user is not assigned to the mailing list Campaign is set to sync with.

I made a video of the whole thing here: https://drive.google.com/open?id=1REj3dMS9urR1mI2Hypl81XIABpy6-GVd

Edit:
Campaign 1.5.0
Campaign Pro 1.0.0

Programmatically send e-mail to single user on certain date which is provided by Calendar plugin

We plan to use a Calendar plugin but we need to have the option to send e-mail notifications on certain events or dates.
For example, in birthday calendar, to send birthday cards on the date of users birthday.
Or, in a business calendar, we would send an e-mail notification or a reminder for an upcoming meeting.

Does Campaign Pro have the option to programmatically send e-mail to users at certain time which is provided by Calendar plugin?

How would we go about it?

Thanks!

Add date to export

It would be great if the export contained opt-in dates and times - either the verification date or created/updated date would work for us.

Can't send test email

Hello

I can't send a test email. I've setup everything like in the docs but I'm always getting this error.

POST http://craft.local/index.php?p=admin/actions/campaign/campaigns/send-test 500 (Internal Server Error) CampaignEdit.js?v=1530856147:19 Uncaught TypeError: Cannot read property 'success' of null at CampaignEdit.js?v=1530856147:19 at Object.error (Craft.js:361) at c (jquery.js:3317) at Object.fireWith [as rejectWith] (jquery.js:3447) at l (jquery.js:9274) at XMLHttpRequest.<anonymous> (jquery.js:9514)

Can anyone help me out?

Regards

Fields don't show up in live preview editing panel

Hello!

Everything worked fine in live preview until the past 3/4 weeks. Now by editing a campaing, fields appear normally in the main editing window, but in live preview they don't show up at all, except for the default "title" field. Maybe is there a problem with the tabs "campaing" / "report" not being selected correctly for the live preview or something like that?

Regards

Can new craft users automatically be imported into lists?

I have a craft user group called abc, and a corresponding mailing list called abc. I can import users from abc into the mailing list without issue, however if I create a new craft user and assign them to abc, i have to manually trigger the import into the mailing list abc again. Can this be automated?

Contact import from user group fails

When trying to import contacts from a user group, the task in the Craft admin UI show "Importing CSV file Failed" (even though the import was via a user group, and not a CSV file).

The craft storage/logs/queue.log shows:

2018-05-17 22:26:47 [172.19.0.1][1][-][info][craft\queue\QueueLogBehavior::beforeExec]  [5] Importing CSV file. (attempt: 1) - Started
2018-05-17 22:26:48 [172.19.0.1][1][-][error][craft\queue\QueueLogBehavior::afterError]  [5] Importing CSV file. (attempt: 1) - Error (time: 0.202s): Invalid argument supplied for foreach()

Nothing of consequence in the storage/logs/phperrors.log or storage/logs/web.log

Note that this error is happening when the Campaign (1.1.2) and Campaign Pro (1.1.0) plugins are installed as trials -- would this have anything to do with the error? It's not clear in the plugins what is / isn't allowed in trial mode.

Translations default to control panel language instead of site language

I've looked through the source and found reference to the current site being set in the getBody() method when generating a view for the email. It seems though that the correct language is not being set. Only if I change the CP language the correct language file is applied.

Is this just in my case or should the correct language be set based on the primary site?

Multiple templates

Would it be possible to configure a campaign so it uses a (tabled) html template for the sendout, but it uses a different entry template to display to contents on the site. (Bootstrap responsive)

Could "Routes" provide a solution?

Support for own templates as verification email and verified message

Hi @putyourlightson

first of all: thanks for this wonderful plugin! It's great to handle all of this newsletter stuff inside Craft.

My only problem is that I want to have my own template for the verification email and for the message which is shown after you click on the verification link. Maybe you have plans to add settings for these kind of templates? Or no settings but triggering an event and other plugins could than tell your plugin which template it should render?

The template for the verified message is maybe a bit easier to change, when I extend your TrackerController, maybe something like this

class MyOwnTrackerController extends TrackerController
{
    public function actionVerifyEmail(): Response
    {
        $response = super::actionVerifyEmail();

        if ($response instanceof Response) {
            // everything went okay
            return $this->renderTemplate('my-own-template');
        }
    }
}

But for the email template you use your contacts service Campaign::$plugin->contacts->sendVerificationEmail($pendingContact); and I don't know how to extend that. Do you have an idea how to do that?

Thanks in advance for any tips or advice! 👍

Sendouts Date/Time Issue

I've run into a couple errors surrounding the Start Date field in various sendouts. I can create a sendout fine, but when I go to edit it, I get a js error: Unexpected token , from this line:

{%- js %}
    $('#{{ id|namespaceInputId|e('js') }}').datepicker($.extend({
        defaultDate: new Date({% if value %}{{ value|date('Y') }}, {{ value|date('n')-1 }}, {{ value|date('j') }}{% endif %})
    }, Craft.datepickerOptions));
{%- endjs %}

which is evaluating to:

$('#date335653413\u002Ddate').datepicker($.extend({
        defaultDate: new Date(, -1, )
    }, Craft.datepickerOptions));

If the sendout status is Pending or Sending, I receive an internal server error with this log:

yii\base\ErrorException: Undefined index: subscribed in /my.url/vendor/putyourlightson/craft-campaign/src/services/SendoutsService.php:220

I suspect something else is afoot, but I can't think of what it might be at the moment. I recently updated Craft / plugins but haven't made any other significant changes to my setup / environment. If you have any thoughts on what might be causing this that would be greatly appreciated!

Versions

Craft | 3.0.34
Campaign | 1.5.2
Campaign Pro| 1.0.0

Import failed

CVS generated lists (Mailchimp) fail to load in import section. Also the field mapping tool only shows one column only.

Running 3.0.0 RC16 on MAMP PRO
2018-03-25_07-42-28

redirect hidden input doesn't seem to redirect after sign up

I copy-pasted the example code from the documentation, but redirect doesn't seem to happen after a successful subscription (the user gets redirected to the homepage).

<form id="subscribe-form" method="post" action="" class="form">
                {{ csrfInput() }}
                <input type="hidden" name="action" value="campaign/t/subscribe" />
                <input type="hidden" name="mailingList" value="{{ mailingList.slug }}" />
                <input type="hidden" name="redirect" value="subscribe-success" />

                ...

I don't use AJAX for the sign up, only the good old form POST method.

Dates

Is it possible to get the postDate of an entry or is the sendout.sendDate the only option?

Issues with removing contacts

We are evaluating a solution to send newsletters with Craft CMS. The Plugin (Campaign & Campaign Pro) seam exact what we are looking for. But we have found some issues on it:

  • When we remove a contact ([email protected]) and try to add the same contact ([email protected]) again it says, that the email with [email protected] is already used

  • When we sendout a campaign and a contact open this email, it shows the correct report (opend 1). But, when we remove this user, it shows up an error on the report error

We are running latest Version of Craft/Campaign/Campaign Pro.

Thanks for your help.

Best regards from Switzerland
Thomas

PS: It's great to have a integrated campaign solution in Craft CMS :-)

Import of user group into Contacts fails

Importing a user group into contacts fails with the following stack trace.

I notice that ImportJob::import is not defined (e.g. public const $import) in the ImportJob class -- should it be?

2018-09-11 21:54:42 [222.153.247.24][1][1nueujok7rpr95p3obm3la0q8a][error][yii\base\UnknownPropertyException] yii\base\UnknownPropertyException: Setting unknown property: putyourlightson\campaign\jobs\ImportJob::import in /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/yiisoft/yii2/base/BaseObject.php:163
Stack trace:
#0 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\BaseObject->__set('import', Object(putyourlightson\campaign\models\ImportModel))
#1 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(putyourlightson\campaign\jobs\ImportJob), Array)
#2 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/putyourlightson/craft-campaign/src/services/ImportsService.php(249): yii\base\BaseObject->__construct(Array)
#3 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/putyourlightson/craft-campaign/src/controllers/ImportsController.php(209): putyourlightson\campaign\services\ImportsService->queueImport(Object(putyourlightson\campaign\models\ImportModel))
#4 [internal function]: putyourlightson\campaign\controllers\ImportsController->actionImportUserGroup()
#5 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#6 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#7 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller->runAction('import-user-gro...', Array)
#8 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('import-user-gro...', Array)
#9 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module->runAction('campaign/import...', Array)
#10 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/craftcms/cms/src/web/Application.php(538): craft\web\Application->runAction('campaign/import...', Array)
#11 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/craftcms/cms/src/web/Application.php(266): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#12 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#13 /var/www/chinacapable/releases/20180909092740/chinacapable/craft/web/index.php(21): yii\base\Application->run()
#14 {main}
2018-09-11 21:54:42 [222.153.247.24][1][1nueujok7rpr95p3obm3la0q8a][info][application] $_GET = [
    'p' => '/admin/campaign/contacts/import'
]

$_POST = [
    'CRAFT_CSRF_TOKEN' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
    'action' => 'campaign/imports/import-user-group'
    'userGroupId' => '2'
    'mailingListId' => [
        0 => '4026'
    ]
    'emailFieldIndex' => 'email'
    'fieldIndexes' => [
        'firstName' => 'firstName'
        'lastName' => 'lastName'
    ]
]

$_FILES = []

$_COOKIE = [
    '1031b8c41dfff97a311a7ac99863bdc5_username' => '9d2c1dfb118c506c9071463a3f2fae7f94c36ec8b6ca0ad5b37fb5c05b1b8697a:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_username\";i:1;s:25:\"[email protected]\";}'
    '__stripe_mid' => '3693b89c-3413-4e53-94f9-a70d03de7375'
    '_ga' => 'GA1.4.567533578.1525683764'
    'certificate' => '4927e14279b33b8a8451ef371b0baccd6942a475938ebf1149b72bb464aba988a:2:{i:0;s:11:\"certificate\";i:1;s:92:\"8f77b26c6148a736d353b7b434f821ad64607c371b13e9f6dca3ac2732a8c100czoxMToiY2VydGlmaWNhdGUiOw==\";}'
    '_gid' => 'GA1.3.21740765.1536652985'
    'CraftSessionId' => '1nueujok7rpr95p3obm3la0q8a'
    '1031b8c41dfff97a311a7ac99863bdc5_identity' => 'd63b6768b9b129a05205a3b054aead87633129d40f6fa43bb09a9b687728916ca:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_identity\";i:1;s:286:\"[\"1\",\"[\\\"SAzxccnBcYJsaXWsnedPf3QeXNfEl5WI58fENzq2k3tlCRUbp0JxlCyjvth4zC4Wko4VzC4uJVgk5qjzNYmS0Kv0p-UDQsB2BRs0\\\",\\\"fabfe36d-841c-4b34-b7fc-2c8eda080dd2\\\",\\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36\\\"]\",3600]\";}'
    'CRAFT_CSRF_TOKEN' => '•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
]

$_SESSION = [
    'bd62416aa8538ede709019a5e113eea5__flash' => []
    '1031b8c41dfff97a311a7ac99863bdc5__id' => '1'
    '1031b8c41dfff97a311a7ac99863bdc5__expire' => 1536663282
]

$_SERVER = [
    'HOSTNAME' => '7e4b02fd7ef7'
    'DB_SERVER' => 'mariadb'
    'DB_PORT' => '3306'
    'PGPASSWORD' => 'welcome'
    'SUPERVISOR_GROUP_NAME' => 'php-fpm7'
    'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
    'HOME' => '/nonexistent'
    'LANG' => 'C.UTF-8'
    'SUPERVISOR_SERVER_URL' => 'unix:///tmp/supervisor.sock'
    'DB_DATABASE' => 'chinacapable'
    'SHLVL' => '1'
    'SUPERVISOR_ENABLED' => '1'
    'DB_USER' => 'administrator'
    'DB_PASSWORD' => '•••••••'
    'NGINX_VERSION' => '1.13.12-1~stretch'
    'php_conf' => '/etc/php/7.2/fpm/php.ini'
    'fpm_conf' => '/etc/php/7.2/fpm/pool.d/www.conf'
    'DEBIAN_FRONTEND' => 'noninteractive'
    'DB_DRIVER' => 'mysql'
    'REDIS_HOST' => 'redis'
    'SUPERVISOR_PROCESS_NAME' => 'php-fpm7'
    'REDIS_PORT' => 'tcp://redis:6379'
    'DB_SCHEMA' => 'public'
    '_' => '/usr/local/bin/supervisord'
    'COMPOSER_VERSION' => '1.6.5'
    'PWD' => '/'
    'USER' => 'nginx'
    'HTTP_X_REAL_IP' => '222.153.247.24'
    'HTTP_X_FORWARDED_SERVER' => 'f63ace29d855'
    'HTTP_X_FORWARDED_PROTO' => 'https'
    'HTTP_X_FORWARDED_PORT' => '443'
    'HTTP_X_FORWARDED_HOST' => 'upgrade.chinacapable.org.nz'
    'HTTP_X_FORWARDED_FOR' => '222.153.247.24'
    'HTTP_UPGRADE_INSECURE_REQUESTS' => '1'
    'HTTP_REFERER' => 'https://upgrade.chinacapable.org.nz/admin/campaign/contacts/import'
    'HTTP_ORIGIN' => 'https://upgrade.chinacapable.org.nz'
    'HTTP_DNT' => '1'
    'HTTP_COOKIE' => '1031b8c41dfff97a311a7ac99863bdc5_username=9d2c1dfb118c506c9071463a3f2fae7f94c36ec8b6ca0ad5b37fb5c05b1b8697a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_username%22%3Bi%3A1%3Bs%3A25%3A%22mebooks.support%40gmail.com%22%3B%7D; __stripe_mid=3693b89c-3413-4e53-94f9-a70d03de7375; _ga=GA1.4.567533578.1525683764; _ga=GA1.3.2039417849.1535863625; certificate=4927e14279b33b8a8451ef371b0baccd6942a475938ebf1149b72bb464aba988a%3A2%3A%7Bi%3A0%3Bs%3A11%3A%22certificate%22%3Bi%3A1%3Bs%3A92%3A%228f77b26c6148a736d353b7b434f821ad64607c371b13e9f6dca3ac2732a8c100czoxMToiY2VydGlmaWNhdGUiOw%3D%3D%22%3B%7D; _gid=GA1.3.21740765.1536652985; CraftSessionId=1nueujok7rpr95p3obm3la0q8a; 1031b8c41dfff97a311a7ac99863bdc5_identity=d63b6768b9b129a05205a3b054aead87633129d40f6fa43bb09a9b687728916ca%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_identity%22%3Bi%3A1%3Bs%3A286%3A%22%5B%221%22%2C%22%5B%5C%22SAzxccnBcYJsaXWsnedPf3QeXNfEl5WI58fENzq2k3tlCRUbp0JxlCyjvth4zC4Wko4VzC4uJVgk5qjzNYmS0Kv0p-UDQsB2BRs0%5C%22%2C%5C%22fabfe36d-841c-4b34-b7fc-2c8eda080dd2%5C%22%2C%5C%22Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_13_6%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F68.0.3440.106+Safari%2F537.36%5C%22%5D%22%2C3600%5D%22%3B%7D; CRAFT_CSRF_TOKEN=37e974fe7da5002dec712d5cbc04226c6a2400b021413da3ab52fde8547eca78a%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A208%3A%22gVVCCNcZ9_sWpUivcT5RKPUCPL_CeFY6BVFbLWR1%7Cc9d5794bfc58c663c077e51c07875614c94971e459d7eaccfac18f49fc861741gVVCCNcZ9_sWpUivcT5RKPUCPL_CeFY6BVFbLWR1%7C1%7C%242y%2413%24r1YTq%2FWqvIuDQvIxwfvaC.YLPUSEedDsDlllSWZTOzjzjEu8cnUt.%22%3B%7D'
    'HTTP_CONTENT_TYPE' => 'application/x-www-form-urlencoded'
    'HTTP_CACHE_CONTROL' => 'max-age=0'
    'HTTP_AUTHORIZATION' => 'Basic YWRtaW5pc3RyYXRvcjpjaGluYWNhcGFibGU='
    'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.9'
    'HTTP_ACCEPT_ENCODING' => 'gzip, deflate, br'
    'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'
    'HTTP_CONTENT_LENGTH' => '771'
    'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'
    'HTTP_HOST' => 'upgrade.chinacapable.org.nz'
    'PATH_INFO' => ''
    'SCRIPT_FILENAME' => '/var/www/chinacapable/current/./chinacapable/craft/web/index.php'
    'REDIRECT_STATUS' => '200'
    'SERVER_NAME' => '_'
    'SERVER_PORT' => '80'
    'SERVER_ADDR' => '172.18.0.6'
    'REMOTE_PORT' => '33014'
    'REMOTE_ADDR' => '172.18.0.2'
    'SERVER_SOFTWARE' => 'nginx/1.13.12'
    'GATEWAY_INTERFACE' => 'CGI/1.1'
    'REQUEST_SCHEME' => 'http'
    'SERVER_PROTOCOL' => 'HTTP/1.1'
    'DOCUMENT_ROOT' => '/var/www/chinacapable/current/./chinacapable/craft/web'
    'DOCUMENT_URI' => '/index.php'
    'REQUEST_URI' => '/admin/campaign/contacts/import'
    'SCRIPT_NAME' => '/index.php'
    'CONTENT_LENGTH' => '771'
    'CONTENT_TYPE' => 'application/x-www-form-urlencoded'
    'REQUEST_METHOD' => 'POST'
    'QUERY_STRING' => 'p=/admin/campaign/contacts/import&'
    'FCGI_ROLE' => 'RESPONDER'
    'PHP_SELF' => ''
    'PHP_AUTH_USER' => 'administrator'
    'PHP_AUTH_PW' => '••••••••••••'
    'REQUEST_TIME_FLOAT' => 1536659682.2007
    'REQUEST_TIME' => 1536659682
    'DOMAIN' => 'upgrade.chinacapable.org.nz'
    'VOLUMES_PREFIX' => './volumes'
    'VOLUMES_PREFIX_SITE' => '/var/www/chinacapable/'
    'VOLUMES_PREFIX_SITE_CURRENT' => '/var/www/chinacapable/current/'
    'VOLUMES_PREFIX_SITE_SHARED' => '/var/www/chinacapable/shared/'
    'EMAIL' => '[email protected]'
    'BASIC_AUTH_USERNAME' => 'administrator'
    'BASIC_AUTH_PASSWORD' => '••••••••••••'
    'BASIC_AUTH_PASSWORD_ENCRYPTED' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
    'TARGET' => 'chinacapable'
    'REPO' => '[email protected]:nzmebooks/chinacapable.git'
    'BRANCH' => 'craft3'
    'BRANCH_STAGING' => 'feature/email-manager'
    'LOCAL' => 'localhost.chinacapable.org.nz'
    'LOCAL_SCHEME' => 'https://'
    'STAGING' => 'staging.chinacapable.org.nz'
    'PRODUCTION' => 'upgrade.chinacapable.org.nz'
    'DEPLOY_USERNAME' => 'deploy'
    'PRIVATE_KEY' => '••••••••••••••••••••••••••••••'
    'SOCKET' => '/var/run/docker.sock'
    'OWNER_AND_GROUP' => '101:wheel'
    'CRAFT_ENVIRONMENT' => 'production'
    'SECURITY_KEY' => '••••••••••••'
    'DB_TABLE_PREFIX' => ''
]

Feature request: drop regular sendouts

After using the plugin for a while, and it’s working great, our workflow is basically working pretty well.

When creating a sendout it's really convenient to get campaign name and subject pre-filled when you use the “save campaign and create sendout” option.

But: we often have to create one internal sendout and one external sendout. The external sendout is usually scheduled.

When creating a scheduled sendout, you can’t get the campaign info pre-filled.. So here is the question: why don’t drop regular sendouts and only use scheduled sendouts? For what is a regular sendout really if not a sendout that is scheduled for “now”..?

If that’s not possible, maybe an option for what type of sendout to create when using the “save campaign and create sendout” option..?

Regards, P

Sendouts don't remember from name/email after pause/resume

If you have two or more From Names and Emails under Settings, then start a sendout using one of the names/emails not on the top of the list, then pause the sendout, then resume it again, the sendout doesn't remember which from name/email you selected, and reverts to using whichever one is the topmost.

Sendout batches don't complete and plugin is very slow

Steps to reproduce.

Slow CP in general, even when not sending anything out

  1. Browse the Craft CP. Clicking any page is snappy as usual.
  2. Click Campaign -> Sendouts and everything slows to a crawl
    2.1) Server I/O usage (capped at 3mb) maxes out at 100%. but returns to a negligible level when the sendout finally opens

Sendouts are incomplete

  • I've configured Campaign as follows 'maxBatchSize' => 200, and 'batchJobDelay' => 7200, so 200 emails every two hrs.
  • I'm trying to send to a list of about 8k
  • Sendout batches manage to send to maybe 50-ish, then just stop.

See video for this in real time, server stats and I/O usage
https://drive.google.com/open?id=16-S6LhQOmrogneNn470qzTpNZJtqCfjm

Can I troubleshoot any of this somewhere? Is there an error log I can look at?

Thanks!

Edit

I've paused and resumed the sendout a few times during my testing of this problem, and looking at the db queue I see that a few jobs have bunched up (see attached image). Is that normal? The first job has a longer delay because I didn't change the campaign.php settings before starting the sendout.
q

Unable to access Contacts Report

Enjoying the new plugin so far but keep seeing the following database exception when trying to access the Contacts report.

Currently running Craft 3 RC15 on Homestead Laravel

image

When attempting to update from 1.1.4 to 1.1.5, I get a Migration fail error...

One of Campaign’s migrations failed.

Database Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'mailingListId'
The SQL being executed was: ALTER TABLE campaign_contacts_campaigns ADD mailingListId int(11) NOT NULL AFTER sendoutId

Migration: putyourlightson\campaign\migrations\m180329_120000_sendout_sending

Output:

> add column mailingListId integer NOT NULL AFTER sendoutId to table {{%campaign_contacts_campaigns}} ...Exception: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'mailingListId'
The SQL being executed was: ALTER TABLE campaign_contacts_campaigns ADD mailingListId int(11) NOT NULL AFTER sendoutId (/my/path/vendor/yiisoft/yii2/db/Schema.php:664)
#0 /my/path/vendor/yiisoft/yii2/db/Command.php(1263): yii\db\Schema->convertException(Object(PDOException), 'ALTER TABLE ca...')
#1 /my/path/vendor/yiisoft/yii2/db/Command.php(1075): yii\db\Command->internalExecute('ALTER TABLE ca...')
#2 /my/path/vendor/yiisoft/yii2/db/Migration.php(377): yii\db\Command->execute()
#3 /my/path/vendor/putyourlightson/craft-campaign/src/migrations/m180329_120000_sendout_sending.php(20): yii\db\Migration->addColumn('{{%campaign_con...', 'mailingListId', Object(craft\db\mysql\ColumnSchemaBuilder))
#4 /my/path/vendor/craftcms/cms/src/db/Migration.php(56): putyourlightson\campaign\migrations\m180329_120000_sendout_sending->safeUp()
#5 /my/path/vendor/craftcms/cms/src/db/MigrationManager.php(243): craft\db\Migration->up(true)
#6 /my/path/vendor/craftcms/cms/src/db/MigrationManager.php(163): craft\db\MigrationManager->migrateUp(Object(putyourlightson\campaign\migrations\m180329_120000_sendout_sending))
#7 /my/path/vendor/craftcms/cms/src/services/Updates.php(216): craft\db\MigrationManager->up()
#8 /my/path/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(435): craft\services\Updates->runMigrations(Array)
#9 /my/path/vendor/craftcms/cms/src/controllers/UpdaterController.php(207): craft\controllers\BaseUpdaterController->runMigrations(Array, 'restore-db')
#10 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#11 /my/path/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 /my/path/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#13 /my/path/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller->runAction('migrate', Array)
#14 /my/path/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('migrate', Array)
#15 /my/path/vendor/craftcms/cms/src/web/Application.php(273): yii\base\Module->runAction('updater/migrate', Array)
#16 /my/path/vendor/craftcms/cms/src/web/Application.php(643): craft\web\Application->runAction('updater/migrate')
#17 /my/path/vendor/craftcms/cms/src/web/Application.php(227): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#18 /my/path/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#19 /my/path/web/index.php(21): yii\base\Application->run()
#20 {main}

Not sure if you need anything else from me :D

Event on mailing list subscription

Is there an event or another way to track when a user has subscribed to a mailing list?

I need to forward each subscriber to an external CRM.

Exporting, importing, and subscribing to lists with a tag or category field

we had a problem with subscribe-actions (and possibly import actions) breaking/throwing errors when we had a tag field for contacts. Perhaps some logic could be made so that they are imported/exported by slug/id instead of the entire tag/category object..?

Reproduce:

  • add a tag field to campaign contacts
  • fill in some tags for some contacts

Test one:

  • export contacts to csv

Result: the exported file has serialized tag objects - not very csv friendly. I guess I would have expected a comma separated list of tag slugs or maybe tag ids.

Test 2:

  • try to subscribe a contact using a subscription form

Result: it fails

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.