Old user upgrades showing incorrectly

Affected version
2.1.2

Russ

Well-known member
We used user upgrades like 4-5 years ago but have since deleted all of them.

Screenshot_1.png

When creating an upgrade, it'll start showing up random old expired upgrades and it shows they had the brand new upgrade that I just created.

Screenshot_2.png


Depending on the type of upgrade, permanent / recurring, it'll show different expired upgrades. The screenshot above is permanent. Deleted that and created a recurring, shows:

Screenshot_3.png
 
Last edited:

Chris D

XenForo developer
Staff member
Pretty sure that, a while ago, we made it so that active/expired records which do not have a corresponding user upgrade are no longer visible.

What this report implies, then, is that the new user upgrades you have created somehow have the same user upgrade record ID as the old active/expired records.

That might happen, for example, if the user upgrades table was at some point truncated. If that happens, the auto-increment index is reset to 0. That means if you create a new user upgrade, it will be given ID 1, which may have existed previously, which may have a bunch of corresponding active/expired records.

Is it possible anything like that happened?

Can you verify the user_upgrade_id of these user upgrades you have created? If they are unusually low (say if you had X number of user upgrades before) then that might explain it.
 

Russ

Well-known member
The current user_upgrade_id on that "test" is 6.

I dropped the entries from xf_user_upgrade_active and xf_user_upgrade_expired (from 5 years ago) for now.

I have a copy of the DB and on the xf_user_upgrade_active I'm seeing
Screenshot_5.png


I don't recall ever really making that many different types of upgrades but not sure.
 
Top