If you manage to get massmailer to actually send emails (see http://civicspacelabs.org/home/node/16805 if you can't), you'll find that your users can't unsubscribe.
If the user clicks the [UNSUBSCRIBE] or [PREFERENCES] link in the email they see a blank page.
The problem is with phplist/config.php.
config.php is included from both in phplist/phplist/index.php and phplist/phplist/admin.php. The later is where the sending of the emails happens, the former is where the unsubscribe happens. The issue is that config.php includes relative paths pointing to sites/something/settings.php. But we'll since the admin directory is one level deeper the relative paths get screwed up when we do an unsubscribe.
This patch includes some checks to make things work from both locations.
The second issue with making the unsubscribe links work is that config.php calls the function parseCline() that is in phplist/admin/index.php. Naturally this works fine when we are sending mail, but when the user tries to unsubscribe this calls a function that doesn't exist. Trying to include phplist/phplist/admin/index.php works only when unsubscribing, fails when sending because admin/index.php includes config.php which would then have to include admin.php. PHP dies when it sees the endles loop hapening. There might be a way to get around that, but I've simply copied the function into config.php and renamed it so we don't have this big mess.
For you CivicSpace folks, there's a few extra steps. You need to download the full phplist
http://prdownloads.sourceforge.net/phplist/phplist-2.10.2.tgz?download
and add the following directories to your phplist/phplist because they aren't included in CS:
phplist/phplist/config/
phplist/phplist/js/
phplist/phplist/styles/
phplist/phplist/text/ < --- if you want something other than English
Then, to get the re-subscribe links working (CSers you'll need to install the phplist tables that aren't included in CS) browse to http://yourdomain.com/modules/massmailer/engines/phplist/phplist/admin/?... (you may have to look in the phplist_admin table to see what the username and password are) and set your lists to active. I think there may be a bug in phplist.module that is not correctly setting lists to active.
There are also a few other changes included in this patch. It appears that what's in the civicspace SVN is not the same as what's in drupal CVS. There are a few changes that CS have made that have not been merged into drupal. Take them or leave them, I'm not sure what problems they fix/create.
So now that I've got this working I'm hoping that massmailer will properly update CiviCRM when it finds a user in phplist_user_blacklist.
| Comment | File | Size | Author |
|---|---|---|---|
| config.patch.txt | 12.94 KB | dalin |
Comments
Comment #1
dalinI've tried to make this patch more elegant, but I can't without modifying code in phplist. If we want to have the phplist user pages and admin pages work, parseArgs() and parseCline() (the same function with two different names) needs to be in both
massmailer/engines/phplist/phplist/admin/index.php
and
massmailer/engines/phplist/config.php
I can't see any way around it.