Closed (fixed)
Project:
Simplenews
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2010 at 13:30 UTC
Updated:
1 Oct 2010 at 19:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
Imagone commentedUpdate: email field is not deleted.
Comment #2
sutharsan commentedTry the attached patch.
Comment #3
Imagone commentedHi,
The patch indeed solved the invalid argument, but the problem of deleting the user fields, wasn't fixed. Then i noticed there were two orphaned actions cron couldn't execute.
Possible they were part of simplenews sheduler: 'simplenews_cron_action' and 'scs_views_create_newsletter_action'. After removing these actions and removing 'cron_semaphore' + 'cron_last' from my database (cause i couldn't run cron anymore) the problem seems to be solved.
Thanx for your help :-)
edit: the problem was solved but.... The invalid argument is solved but now ,after several tests, the deleting of user-fields reoccured. I have a feeling it has something to do with the simplenews scheduler. Though disabling that module did not solve the problem. I'm going to reïnstall Simplenews module and go for some testing (simplenews module only).
Comment #4
sutharsan commentedPatch #2 is committed. I keep the issue open for your test results.
Comment #5
xsean commentedwhen i try to delete the newsletter subscriber, it show me the error message below and it did not delete the selected subscriber.
* warning: array_filter() [function.array-filter]: The first argument should be an array in ../public_html/sites/all/modules/simplenews/simplenews.admin.inc on line 339.
* warning: Invalid argument supplied for foreach() in ../public_html/sites/all/modules/simplenews/simplenews.admin.inc on line 339.
* warning: Invalid argument supplied for foreach() in ../public_html/sites/all/modules/simplenews/simplenews.admin.inc on line 366.
Is this issue related to this bug?
Comment #6
sutharsan commentedNo, not related. Pls create a new issue so we can keep track of different bugs.
Comment #7
sutharsan commentedClosing...
Comment #9
roball commentedUnfortunately, I can confirm that *all* fields defined by Drupal core's Profile module gets deleted for a certain user once this user logs in and the message "You have been subscribed to [Newsletter-Name]." appears on top of user/[UID]. This still occurs with the latest 2.x dev (2010-May-20).
I have no related error messages in the log, thus can confirm Imagone's report in #3. The patch solved the PHP error but the worse thing of deleting all user profile fields is still there. I do NOT (and have never used) Simplenews scheduler, so it's unrelated to that module.
Problem goes away when I disable the Simplenews module and comes back when I re-enable it, so it is definitely related to Simplenews.
Comment #10
roball commentedJust found out that the problematic code is in the block
in "simplenews.module". Commenting out the line
user_save($account, $data);solved the problem so far.Comment #11
miro_dietikerroball, something like user_save is needed here. If we don't save, simplenews will resubscribe the user after each login to the newsletters chosen on registration. (note the messages displayes about subscriptions occurred.)
Please test this situation (register, logout, login) and provide a patch that also resets the login-subscription action.
Comment #12
roball commentedI even have no self-registration allowed, but the annoying "You have been subscribed to [Newsletter-Name]." message appeares *every* time the user logged in, as well as the profile field values getting silently deleted. It seems that the whole logic belonging to
case 'login'(currently beginning on line 777 of "simplenews.module") should be re-considered.Removing user_save() solved the big problem of deleting the profile field values for me (the other issue still remains). Can you reproduce the problem?
Comment #13
roball commentedI am sorry to say, but this critical bug is really extreme dangerous! I would strongly recommend to comment out the line mentioned above (it is line 824 of "simplenews.module" v 1.220.2.32) until there is a solution. The damage this line does is much worse than what it is supposed to do. All your users having profile fields set will lose all the values when they login. Really BAD! The module could currently also be called "Profile fields killer". Sorry, but this critical bug really needs urgent attention - thanks for your understanding.
Comment #14
miro_dietikerBumping this also.
We need to fix 6--2 profile handling before releasing it.
Comment #15
roball commentedI no longer see this problem with the latest 6.x-2.x-dev (2010-Sep-17).