Bug Threads Auto Close Not Operating Correctly

Status
Not open for further replies.
I did try this on exactly the forums you specified in your previous post. Can you please repeat the steps with the account you provided me, just in case that is the issue?
 
Please look at the forum after turning on the plugin AND while you are not logged in. It's easiest for me to do this by using two different browsers...one to go to the control panel, one that is not caching anything where I can log in or out.

Despite the selection of ALL the usergroups - all should see the same theads closed, different groups see different things:

Unregistered: Every forum shows locks for anything over 30 days.
Registered: Doesn't show lock on any threads
Administrator: Does not show lock on any threads.

Check first page of this forum Forum Rules & Account Help

and 500 of this forum (I've closed some manually, so you need to move back quite a bit to make sure)

Mark Rippetoe Q&A
 
Upon further inspection, that would appear to be working as intended.

The "is thread open" code works like so:
  1. Is the forum not in the list of excluded forums
  2. AND
    1. Has it hit max replies
    2. OR is the current viewing user a member of a user group in the "Included Usergroups" list
    3. OR is the current viewing user in the "Include Users" list

In other words, if you tick every single user group, then every single thread from every single forum (except the excluded forums) will be closed 100% of the time.

However, there's another caveat to consider. When someone replies to a thread, this mod toggles a separate "last post" column. This column will not be updated when the mod is disabled, so you would be in a situation where every thread created before this mod was installed, or when it was disabled, would have a 0 for this new column.

This means that the code that checks for whether the last post is older than the "close threads older than X" setting will always return true, as 0 is less than <whatever the current timestamp is>.

The reason why there's a separate column is that certain moderator actions should update this separate column to keep the mod from closing the thread.

You can batch update old threads by running this query:
Code:
		UPDATE thread 
		SET dbtech_act_lastpost = lastpost 
		WHERE dbtech_act_lastpost = 0
Please remember to add your table prefix, if you use one.

After you have done this, please untick the checkboxes as described earlier in this post, then test it again.
 
Sorry, I don't get the usergroup option.
I intend for all usergroups to be subjected to the 30 day close rule on the forums that are selected.
Do I check them off (that is what I have now) or leave those unselected?

Also, your rule set above suggests that I need to not just select the forums the 30 days is supposed to apply to, but also to exclude the forums it is not supposed to apply to. Is this correct?
 
Sorry, I don't get the usergroup option.
I intend for all usergroups to be subjected to the 30 day close rule on the forums that are selected.
Do I check them off (that is what I have now) or leave those unselected?
I think the main problem is the query from my previous post, can you try leaving the option as-is and run that query first?

Also, your rule set above suggests that I need to not just select the forums the 30 days is supposed to apply to, but also to exclude the forums it is not supposed to apply to. Is this correct?
You shouldn't need to, but it can't hurt :)
 
Enabled threads close.
Set forums that should not be closed as "excluded"

Ran the query.
Message returned at the end was: "Affected Rows: 0 (0.1832s)"


Tested with admin account, regular user and newly created registered user: For all of these thread were not closed that should have been closed.
Unlogged in account shows all threads in all forums over the cutoff period as locked.
Unticked boxes -- behavior is the same for all groups above.
Ticked box just for regular user -- still doesn't show any closed threads and the unlogged in user still sees all threads in all forums past the cutoff date as closed
I un-enabled threads close.
 
Last edited:
Status
Not open for further replies.

Legacy Threads Auto Close

vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
26
Customer rating
0.00 star(s) 0 ratings
Back
Top