Jump to:
| Project: | PHPlist Integration Module |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Upon installation and config, Synchronizing seems to work just fine. However after making changes to any user field and saving Drupal displays the following errors:
+++++++++++++++++
* user warning: Duplicate entry '' for key 2 query: INSERT INTO phplist_user_user (email, entered, htmlemail, confirmed, uniqid) VALUES('', NOW(), 1, 1, 'eb1e3216abd9cd49c6da82334aa16518') in /home/username/public_html/website.com/sites/all/modules/phplist/phplist.module on line 642.
* warning: Invalid argument supplied for foreach() in /home/username/public_html/website.com/sites/all/modules/phplist/phplist.module on line 654.
The changes have been saved.
+++++++++++++++++
After this the username/email address (possibly more data too) is/are missing from the phplist users table.
Any Ideas?
Comments
#1
Hi,
Please try the latest D6-DEV version as this should address the problem you are facing.
Regards,
- Paul
#2
Hi
I'm getting the same error using:
As per chewy_gore's report the initial synchronisation works, and repeatedly editing a user's email address in the Drupal profile is correctly auto-replicated to the associated phplist user. The problem comes when editing an item on a profile category other than on the built-in "Account" category... the following seems to be happening:
I've not delved into the code... where is the Integration Module picking up the email address it uses?... from the form itself?... if so, the field named "mail" only appears on the "Account" category so would produce a null value on all other categories... just an idea ;-)
---
LITL.W/L
Dominic
#3
Thanks for the info, Dominic.
What you are saying makes perfect sense. I know where the problem is now and will fix it asap.
Regards,
- Paul
#4
Ok, I have just updated the D6-DEV release with a fix for this. If anyone can tell me why I would need to be using $user->init instead of $user->mail in _phplist_sync_user() when updating the user profile pages ($user->mail is empty...), I would be very interested to know!
Regards,
- Paul
#5
Nice one Paul :) I'm not configured for direct CVS access so I shall try the update as soon as it appears in the dev snapshot.
---
LITL.W/L
Dominic
#6
Hi Paul,
The dev snapshot of 2009-03-20 now contains your update... at first the reported problem seemed to have gone. However some deeper tests have shown it to still be there in a modified form. Additionally I have discovered a new (but possibly related) bug which I'll call the Buffered Data Problem. Here are some instructions to reproduce the issues:
For clarity, start with an empty user table in PHPlist and a single list, plus a populated Drupal user table and all the necessary settings / permissions. Do not do an initial synchronise. This way we keep the PHPlist user table short and sweet).
So far so good. But…
Clean up and perform another test...
Hope you can fix these RSN... I'm working on a new Drupal site that needs to be integrated with an existing PHPlist install =)
---
LITL.W/L
Dominic
#7
Hi Dominic,
A *huge* thak you for providing such clear, detailed and precise information. Exactly what a developer needs to debug things quickly and accurately.
I have managed to very quickly find the problem and I think (hope!) provide a definitive solution. I have to rework phplist_user() a bit - I hadn't quite mastered the diffrerent phases of the user update process. I have done lots of testing on my installation and it seems ok now, whichever of the user account tabs you update.
Please download the latest D6-DEV version once the update filters through and let me know how you get on?
Regards,
- Paul
#8
Fantastico - it works :-)
Thanks for a speedy turn around. I'm new to Drupal, but have a 20 year background in IT management, and have amongst other things developed custom modules for my Gallery 2 installation (http://photographicon.com/)... so I know how to do testing and bug reports =)
LITL.W/L
Dominic
dom (a) photographicon.com
#9
#10
Automatically closed -- issue fixed for 2 weeks with no activity.