Project

General

Profile

Actions

Bug #1614

closed

Non-CUNY Sign-Up Code Disappears After Creation

Added by Matt Gold about 12 years ago. Updated about 12 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2012-02-02
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

I've now used the non-CUNY sign up code tool twice. It's great. But I have noticed a strange bug: a certain period after the code is put up, people report that the code doesn't work. When I check the backend at that point, the entry for that code appears to have lost both the code itself and the group with which the code was associated -- both fields are blank. Maybe this is happening after someone successfully uses the code -- ie., after a successful use, it resets?

In both cases, I have re-entered the code and group, and it appears to stick after that.

Actions #1

Updated by Boone Gorges about 12 years ago

  • Status changed from Assigned to Hold

It's hard for me to see how this could happen, looking at the code. Next time it happens on the live site, will you let me know right away, before you fix it, so that I can look at the database?

Actions #2

Updated by Matt Gold about 12 years ago

Sure, but it might be worth creating your own sign-up and seeing what happens to it -- I'm not completely sure these codes have been used before they've disappeared.

Actions #3

Updated by Boone Gorges about 12 years ago

  • Target version changed from 1.3.6 to 1.3.7
Actions #4

Updated by Boone Gorges about 12 years ago

  • Target version changed from 1.3.7 to 1.3.8
Actions #5

Updated by Boone Gorges about 12 years ago

  • Target version changed from 1.3.8 to 1.3.9
Actions #6

Updated by Boone Gorges about 12 years ago

  • Target version changed from 1.3.9 to 1.3.10
Actions #7

Updated by Boone Gorges about 12 years ago

There appears to have been a change (in WP maybe? not sure) that caused the plugin not to show up in Dashboard menus. I doubt that this is causing the original problem in this ticket, but it's preventing me from doing proper testing. I've fixed these regressions in https://github.com/castiron/cac/commit/180a85dd4cd693b6a3ef79e67e8e37295401d609 and will attempt to do more thorough testing in the next cycle.

Actions #8

Updated by Boone Gorges about 12 years ago

  • Target version changed from 1.3.10 to 1.3.11
Actions #9

Updated by Matt Gold about 12 years ago

Okay - thanks.

Actions #10

Updated by Boone Gorges about 12 years ago

  • Status changed from Hold to Resolved

After further examination, I think I found the culprit.

If you leave the post.php edit window open for a while (more than 2 minutes, by default), WP runs its autosave javascript, which in turn fires the `save_post` action. I'd been saving the custom post data (BP groups and signup code) on `save_post`. But WP's autosave is not aware of custom fields in the interface (which is IMO a glaring error, but anyway), with the result that my save method was detecting null values for these fields, in effect erasing them.

I've fixed this issue in https://github.com/castiron/cac/commit/2d7eb67c6ca601726c98c36d9b12b8dff06bc779 by not running my routine on autosave. I'm tentatively marking this issue as resolved. Please reopen if it happens again.

Actions #11

Updated by Matt Gold about 12 years ago

Awesome and nice catch. Thanks, Boone.

Actions

Also available in: Atom PDF