Closed (fixed)
Project:
PHPlist Integration Module
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2008 at 11:09 UTC
Updated:
26 Nov 2009 at 11:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
paulbeaney commentedHi cbrody,
Seems strange that everything except the list subscription is working.. Is your site publicly accessible so I can take a peek at it?
Regards,
- Paul
Comment #2
paulbeaney commentedI have come across an interesting problem on my own server which may shed some light on this problem - the only thing is that I have no idea to fix or work round it. Bascially, the problem seems to be that if a phpList server is specified which is anything other than an IP address, it seems the call to drupal_httpd_request in the phpList module can't do a DNS lookup and fails with an error code -19074860.
If anyone else could confirm this, it would be very helpful, and if there is anyone watching this issue who knows about sockets and the underlying processes, any insight would be very useful. For info, my configuration is OSX Leopard, PHP 5.2.5, Apache 2.2.8.
Regards,
- Paul
Comment #3
paulbeaney commentedOk, I have just updated the DEV versions of both modules to fix the issue where users were getting added to the phpList database, but not signed up to the lists - you should find this works ok now. It *doesn't* resolve the DNS lookup problem, but I guess that might just be specific to my machine.
Please test and let me know.
- Paul
Comment #4
paulbeaney commentedSpoke too soon - Drupal won't let me update CVS from Eclipse at the moment.
Here's a patch file instead.
Regards,
- Paul
Comment #5
paulbeaney commentedPatch is now in the HEAD releases.
Comment #6
cbrody commentedI've tried the new version and get the error "Oops, you have not been added to the mailing list; please contact a site administrator." The emails are being added to the database but not added to the mailing list(s).
Comment #7
paulbeaney commentedHi,
I have just re-downloaded the D5-dev version to double-check everything is ok, and it works fine for me. You could try adding these lines to the module (inserting them at line 1012 - new code is in bold. D6-DEV users, please see line 1290):
$result = drupal_http_request($subscribe_url, $headers, 'POST', $postdata);if ($result->code != 200 || strpos($result->data, 'Thank you for subscribing') === FALSE) {Running that will show you what (if anything) Drupal is receiving back when it sends the information to your phpList server.
Regards,
- Paul
Comment #8
cbrody commentedMy previous post was incorrect -- users are now being added to the list(s). Thanks for fixing this. However, the "Oops..." error message still appears, perhaps because we are not using the default subscribe page? Here's the data returned:
followed by the customised page (which includes the string "Thank you for subscribing"), then:
Comment #9
paulbeaney commentedHi,
Looking at line 1013 in the module, and your HTTP header information (thanks for that - very useful), I would guess that the redirection is causing the problem. The module looks for a return code of 200, but your setup gives a 301 redirection. Try changing :
to:
to see if that helps?
Regards,
- Paul
Comment #10
cbrody commentedIt now works correctly; thanks.
Two further things (perhaps I should start new issues):
1. Rather than display a drupal message, it would be useful to have an option to re-direct to the subscribe page instead (the message block gets rather lost on our home page).
2. The subscribe block doesn't appear if you're logged in. Is this by design?
Comment #11
paulbeaney commentedHi,
In regards to your issues:
1. A subscribe page doesn't exist for anonymous users. That side of things is handled exclusively by phpList for this class of user, hence why the only sensible thing is to come back to the same page.
2. Yes, this is by design. You'd really need a different block for logged in users, as they don't need to enter their email or submit their subscription via this mechanism - it is all handled in "My Account" (and goes direct into the phpList databse, thus bypassing confirmation emails etc.) It would be feasible to create block for logged-in users which simpl showed X lists with toggle buttons to (un)subscribe from each list.
Regards,
- Paul
Comment #12
paulbeaney commentedNo recent activity