Merge/Rebuild Thread With "Move"

frm

Well-known member
I came across this problem where I selectively moved posts from one destination to another to merge them into a new post. I wanted the original post of the thread moved into to stay at the top, as well as some other posts moved around so that it's in a followable order.

Instead, the OP was last, presumably because the post_id was greater than the older posts as I changed the post date to be earlier and it still wouldn't appear at the top.

We should be able to move posts into threads/merge threads and rearrange them as we see fit or it can get quite confusing where one topic left off and one picked up as they could potentially be about same things in a different thread meant for something else, moved into a new thread just discussing that matter.

It'd be great that if we moved threads/merged them that we could "rebuild" them by possibly archiving the old posts and transferring all data to the new posts, and, assigning a new post_id to where we want it to show in the thread.

Moving different posts around in a current thread with a rebuilding process could also be helpful as well.
 

Lukas W.

Formerly katsulynx
Posts are ordered by the "position" field which is rebuilt based on the post date. If you're using a plugin to change the post date, it would ideally rebuild the positions inside the thread accordingly.
 

frm

Well-known member
Posts are ordered by the "position" field which is rebuilt based on the post date. If you're using a plugin to change the post date, it would ideally rebuild the positions inside the thread accordingly.
I manually (MySQL) changed the post date and it reflected as such, but still showed last. Is there a rebuild thread cache tool or something?
 

Brentnauer

Well-known member
I manually (MySQL) changed the post date and it reflected as such, but still showed last. Is there a rebuild thread cache tool or something?
You'll want to update the "position" column in addition to the "post date" column for posts. Search that table by thread ID, sort by post date and then go down the position column, counting from 0 first.
 
  • Like
Reactions: frm

frm

Well-known member
You'll want to update the "position" column in addition to the "post date" column for posts. Search that table by thread ID, sort by post date and then go down the position column, counting from 0 first.
I'll try that with the archived posts and new ones that I rebuilt. I didn't know there was a "position" regardless of the date, just assumed by "post_id".

Should have editing of positions in every thread as a moderator permission though... It can really mess things up doing it this way.

Thank you. :)
 

Lukas W.

Formerly katsulynx
Positions get rebuilt based on post date when you run the "Rebuilt threads" rebuild tool with "Rebuild positions and post counters" enabled, as well as on some automated occasions. Any manual changes are likely to be overwritten sooner or later by the automated system, so unless it comes up with the same order, those changes will be lost.
 
  • Like
Reactions: frm

frm

Well-known member
Positions get rebuilt based on post date when you run the "Rebuilt threads" rebuild tool with "Rebuild positions and post counters" enabled, as well as on some automated occasions. Any manual changes are likely to be overwritten sooner or later by the automated system, so unless it comes up with the same order, those changes will be lost.
Could you hypothetically reorder position and modify the date so it's not overridden?
 

Lukas W.

Formerly katsulynx
Could you hypothetically reorder position and modify the date so it's not overridden?
As long as ordering by date would bring it into the same position as you've set manually, yes. The automated system will just grab all posts, order them by date and start counting upwards from 0, incrementing the counter for each visible post (moderated and soft-deleted posts will not increase the counter, as that's the purpose of the position field, to keep the number of visible posts per page exactly the same).
 
  • Like
Reactions: frm

frm

Well-known member
Seems like something that should still be considered going in the front end of moderation to move posts around when merging to keep a conversation in readable order.
 
Top