XF 2.1 User change log - some entries remaining that should not

Martok

Well-known member
I have just checked the user change log on my site (running XenForo 2.1.3) and noticed entries older than 60 days (which is the default setting we have for this for pruning). I understand that some entries are protected and marked by the blue left feature border:

1564754572302.webp

However I have some others, not marked by this border, that remain and are older than 60 days. These include some changes to DOB, homepage, About, Location, Online status, Secondary User Groups, Avatar Date, Occupation.

I've tried running the daily cleanup cron but no change to these entries. I've tried rebuilding the master data and disabled all add-ons, yet still no change. The daily cleanup cron does work though as when I tested this on the moderator log which I shortened the length of, it pruned entries from that.

Am I missing something, or is there potentially a bug here?
 
Not something we can reproduce here which is obviously a reasonably busy forum.
SQL:
SELECT *
FROM xf_change_log
WHERE edit_date < UNIX_TIMESTAMP() - 60 * 86400
AND protected = 0
That should list any non-protected entries which are older than 60 days.

The delete query we actually run in the clean up is literally almost the same:
SQL:
DELETE FROM xf_change_log
WHERE edit_date < UNIX_TIMESTAMP() - 60 * 86400
AND protected = 0
Though I wouldn't recommend running it before you ascertain why it doesn't appear to be running automatically.

Something to note, however, it's actually the hourly clean up cron that attempts to clean up the change logs. So definitely worth trying to run that one manually (and making sure it's actually running) to see if anything changes.

If there are no errors, I can really only envisage it being an add-on issue, so you may need to disable all add-ons and then try again.
 
tl;dr - this might have been a bug with an earlier version of XF 1.5.x when GDPR compliance was added, or maybe an add-on?

I guess the best solution for me is to run some queries to remove the change log entries that shouldn't have been kept?

-----------------

I ran the query and it shows there are no non-protected entries older than 60 days.

When I run the query with AND protected = 1, it shows me the protected entries over 60 days old and along with the expected ones (privacy policy, terms, email etc) that are marked as such in the ACP user change log, it's also showing ones that I wouldn't expect (that are in the ACP user change log without the protected marking), including:

Show year of birth, About, Show current activity, Moderator, Staff member, Secondary user groups, Show online status etc

Checking further, my change logs go back to 21 May 2018 and every entry from that date until 9 June 2019 when the first non-protected entry can be seen (though entries after 2 February 2019 to 9 June 2019 are ones expected to be protected)

I only have 2 add-ons (XFMG and Who Has Visited in last 24 hours). I doubt that either of these would affect the protected status of change log entries and the Who Has Visited one was only added to the site in March 2019 whereas some of these entries that I don't think should be protected should have been long deleted by then.

It was in May 2018 that the 1.5.x updates with GDPR compliance were released. I was still on 1.5.x back then and didn't move XenForo 2 until 16th February 2019.

So, I'm guessing it's an issue with an early version of 1.5.x when GDPR compliance was added or potentially an add-on (though I'm not sure what from the ones I had at that time) that meant some entries were protected that shouldn't have been?
 
What you're reporting here is confusing.

You're saying that the entries that shouldn't be there, ARE actually protected, but they're not showing as protected in the UI. That's not actually technically possible as far as I can figure out.

The logic is literally if protected = blue left border else no left border. So they're either protected and displayed as such, or not protected and not displayed as such.

I don't recognise or acknowledge any relevant bugs that would have marked any change log entries erroneously.
 
Yes, I agree it doesn't seem to make sense. However, here is an example:

1565010064128.webp

1565010403271.webp

As you can see, the entry in the ACP doesn't have the protected blue border, yet it is showing as protected in the database. No idea why this should be the case re the blue border (which does show for other correctly protected entries).

So I don't know if the protected entries that shouldn't be protected was caused by an XF 1.5.x add-on or if there's the potential that XF 1.5.x could have caused this somehow. It seems that moving to XF 2.1 has resolved this for me for newer entries which appear to have the correct protected/non-protected status.

I guess the best solution for me is to run some queries to remove the change log entries that shouldn't have been kept?
 
I guess the best solution for me is to run some queries to remove the change log entries that shouldn't have been kept?
No. We wouldn't recommend that. If anything, you'll just have to leave them.

I think actually we need to see this ourselves to figure out what's going on here. Please submit a ticket with PhpMyAdmin details and an admin login and we'll take a look.
 
Top Bottom