CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership keeps getting extended by bug/error/user?
Pages: [1]

Author Topic: Membership keeps getting extended by bug/error/user?  (Read 934 times)

gastrit

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 2
  • CiviCRM version: 4.2.2
  • CMS version: 7.8
  • MySQL version: 5.1.41
  • PHP version: 5.3.2
Membership keeps getting extended by bug/error/user?
January 17, 2012, 07:29:08 am
Hi!

I have an issue with one of our members. His membership end date keeps getting extended one year several times per day and we don't know why. This is from civicrm_membership_log:
select * from civicrm_membership_log where membership_id = 16972 order by id desc limit 100;
+-------+---------------+-----------+------------+------------+-------------+---------------+-----------------------+--------------------+
| id    | membership_id | status_id | start_date | end_date   | modified_id | modified_date | renewal_reminder_date | membership_type_id |
+-------+---------------+-----------+------------+------------+-------------+---------------+-----------------------+--------------------+
| 26556 |         16972 |         2 | 2241-01-01 | 2241-12-31 |          30 | 2012-01-17    | NULL                  |                  1 |
| 26554 |         16972 |         2 | 2240-01-01 | 2240-12-31 |          30 | 2012-01-17    | NULL                  |                  1 |
| 26552 |         16972 |         2 | 2239-01-01 | 2239-12-31 |          30 | 2012-01-17    | NULL                  |                  1 |
...
| 26070 |         16972 |         6  | 1978-01-01 | 2004-04-21 |         3295| NULL               | NULL                  |                  1 |
| 25938 |         16972 |        11 | 1978-01-01 | 2004-04-21 |        4875 | 2012-01-10    | NULL                  |                  1 |

Id=4875 is myself (my record in the log is the last "normal" record), id=3295 is one of the back-end admins (who seems to have updated the membership correctly but NULL is stored in the modified_date column) and id=30 is the contact who owns the membership. The contact with id=30 is not linked with any drupal user and can't login. Still it looks like he is updating his membership 20-30 times a day - really weird!

I can't find any records in civicrm_log that corresponds to the one above. Is there any other log I should check? Does anyone have clue of what is happening?

UpdateMembershipRecord.php is run once a day and action.cronjob.php is run every minute. And there's no other scheduled jobs except a file backup (once every night) and database backup (once every night).

gastrit

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 2
  • CiviCRM version: 4.2.2
  • CMS version: 7.8
  • MySQL version: 5.1.41
  • PHP version: 5.3.2
Re: Membership keeps getting extended by bug/error/user?
January 18, 2012, 04:43:13 am
If I update the membership status to cancelled (id=6) the unkown update process starts by itself after a while. I really don't know where to look. I've tried civicrm_membership_log and civicrm_log and apache access log but I can't find anything.

This is how it looks in civicrm_membership_log:
mysql> select * from civicrm_membership_log where membership_id = 16972 order by id desc limit 6;
+-------+---------------+-----------+------------+------------+-------------+---------------+-----------------------+--------------------+
| id    | membership_id | status_id | start_date | end_date   | modified_id | modified_date | renewal_reminder_date | membership_type_id |
+-------+---------------+-----------+------------+------------+-------------+---------------+-----------------------+--------------------+
| 26580 |         16972 |         2 | 2016-01-01 | 2016-12-31 |          30 | 2012-01-17    | NULL                  |                  1 |
| 26578 |         16972 |         2 | 2015-01-01 | 2015-12-31 |          30 | 2012-01-17    | NULL                  |                  1 |
| 26577 |         16972 |         2 | 2014-01-01 | 2014-12-31 |          30 | 2012-01-17    | NULL                  |                  1 |
| 26575 |         16972 |         2 | 2013-01-01 | 2013-12-31 |          30 | 2012-01-17    | NULL                  |                  1 |
| 26573 |         16972 |         2 | 2012-01-01 | 2012-12-31 |          30 | 2012-01-17    | NULL                  |                  1 |
| 26572 |         16972 |         6 | 1978-01-01 | 2004-04-21 |      4875 | 2012-01-17    | NULL                  |                  1 |

And if I change the status to a custom status (id=11) then civicrm_membership_log contains the info from previous post where it seems like a back-end staff has changed the status to cancelled. The back-end person says she hasn't done anything. Can she have something in her browser, like a bookmark or something, that's making her do this without knowing it?

I don't know what to do next. Any ideas?

gastrit

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 2
  • CiviCRM version: 4.2.2
  • CMS version: 7.8
  • MySQL version: 5.1.41
  • PHP version: 5.3.2
Re: Membership keeps getting extended by bug/error/user?
January 23, 2012, 01:06:37 am
It's still going on...

I have now checked every date that this "phenomen" has occured and all the dates was weekdays. The membership has been renewed wednesday, thursday, friday and then a paus during the weekend. On monday the log is showing new end dates again.

I also see that in the log the start date is increased by a year for every record but the record in civicrm_membership contains 2012-01-01 all the time. The real value should be 1978-01-01, though. So start date is also changed but just once. Then only the end date is increased.

Any ideas? Please...

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Membership keeps getting extended by bug/error/user?
January 23, 2012, 01:27:31 am
CiviCRM does not automatically update membership records. As you have mentioned there are lots of records in "civicrm_membership_log", I think UpdateMembership or some other script is run multiple times. So I would suggest disabling all the crons and check if that helps.

Kurund
Found this reply helpful? Support CiviCRM

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Membership keeps getting extended by bug/error/user?
January 23, 2012, 07:41:41 am

seems like its being run off a script that someone runs on a weekday / when logged in. Can you narrow down the time it happens. if it happens at exactly the same time weekdays, its more likely its some script that maybe u've forgotten about doing it?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

gastrit

  • I post occasionally
  • **
  • Posts: 60
  • Karma: 2
  • CiviCRM version: 4.2.2
  • CMS version: 7.8
  • MySQL version: 5.1.41
  • PHP version: 5.3.2
Re: Membership keeps getting extended by bug/error/user?
January 24, 2012, 06:52:40 am
I've just checked my cron again:

UpdateMembershipRecord.php is only run once every night (also on weekends) so it can't be that script

action.cronjob.php and civimail.cronjob.php is runned every third minute every day so I don't see that could the issue either

I am the only person that have ssh access to the server so if someone is running a script it has to be via the browser. Maybe one of the back end staff is accessing a web page that he/she shouldn't. But what kind of page could that be?! A page that is only updating one member end date. This is fishy!

I've tried to set the status to expired, cancelled and some of the custom statuses but the end date still gets updated. But it seem to have something with the cancelled status because the membership status always fall backs to cancelled and starts getting extended.

There's only a date field in civicrm_membership_log so I can't narrow down the time. I don't know where else I could look for more info. And it does not happen every day.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Membership keeps getting extended by bug/error/user?

This forum was archived on 2017-11-26.