PHPList v3.6.13 not observing Segment Conditions

I upgraded my PHPList installation from 3.6.1 to 3.6.13 recently and have noticed in the first campaign mailout it did not observe the segment conditions specified.

The segment rule was for a subscriber match on a single attribute with a “is none of” operator for a specified attribute value. eg “attribute A is none of attribute value”

Here’s a timeline of events:

o June 5 - campaign X mailed out using v3.6.1 with successful delivery only to subscribers matching segment conditions

o June 6 - campaign X copied to campaign Y using CampaignsPlugin. Campaign content was updated but copied segment conditions left as is

o June 9 - upgraded to v3.6.13

o June 12 - campaign Y mailed out using v3.6.13 with successful delivery to ALL subscribers ignoring segment conditions

Troubleshooting actions:

o Viewed campaign Y using “List of Campaigns” view option. Segment condition listed as per campaign X

o Created test campaign with same segment conditions as campaign Y. Ran “Calculate” option and segment conditions successfully met.

o reviewed “phpList Message queue processing report” for campaigns X & Y for a email not matching segment condition with following report entry results:

v3.6.1 → Not sending toemailaddress

v3.6.13 → Sending Y to emailaddress

Is this a bug with v3.6.13 or is there some other issue?

Just to be clear, the new campaign that you created with the same segment conditions showed the correct number of subscribers using the Calculate button. Are you able to send that campaign to confirm that it goes to the same subscribers?

The plugin hasn’t really changed much since the version that is in phplist 3.6.1. I’ll do a few tests to see whether I hit any similar problem.

The Calculate button was run on a test Campaign Z.

Campaign Y which was the production mailout that didn’t observe the segment condition did not have Calculate run. It was assumed it would work as per the previous Campaign X production mailout.

As part of troubleshooting Campaign Y was copied to a test Campaign Z. The Calculate button on Campaign Z successfully interpered the segment condition.

I won’t be sending Campaign Z to the same target audience for another week or more but would prefer to know the segment condition is working as expected before doing so.

@halfmack I tested your segment condition of “is none of” on a small test list and the plugin selected the correct subscribers. Also, requeued a “real” campaign that sends to subscribers whose text attribute is not blank and it again selected the correct subscribers.

Can you look at the event log page for the time you sent campaign Y? There should be an event issued by phplist when starting to process the campaign
One campaign to process.

followed by an event from the plugin
Segment plugin selected 12 subscribers for campaign 180

Did the plugin issue a similar event message?

I checked the v3.6.13 events but there were no references to “segment”.

I checked the v3.6.1 events and saw the “Segment plugin selected …”

I also checked the SegmentPlugin which reported version 2.13.2+20230403 Installed 26 October 2017. I tried the Update option in “Manage plugins” but it installed the same version.

I copied the campaign and set up to a list with 2 subscribers, one matching the condition and one not. Calculate worked only listing 1 subscriber but when the campaign mailed out it was still sent to both subscribers.

It appears segment plugin is not firing when the mailout is processed.

@halfmack Thanks. How are you processing the message queue, using a cron job or through the browser admin interface? If it is through a cron job, please check the version of php that is being used.

1 Like

@halfmack The problem might be that Common plugin is not being enabled. That now requires php 7 or later, so ensure that the cron job is running the same version of php as the web server. You can see that in phplist through menu Config > phpinfo

@duncanc Am running via cron and while the web server is configured for php 7.4 the cronjob was referencing the php 5.6 binary which was setup several years ago with an older version of phplist. Changed cronjob to 7.4 binary and now segment plugin is operating correctly on campaign mailout!

Thanks for your assistance.