Support Forum

Big problem with "Order Groups and Forums", I have to reorder all the forums every time I add one.

JG Joel Gomez
Joel Gomez
Member

Every time I add one or more forums I need to visit the “Order Groups and Forums” option and all of them are in disorder.

It seems that the forums go back to its original ID number every time I click on “Order Groups and Forums” option. 

Can anyone help? THANKS!

17 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

While we have had a few users report issues with this they have all – to date – come down to a conflict with something else they have active on their site. Which can be a little tricky to pin down. Certainly there is nothing in the code or procedure that uses the forum ID’s for sorting and ordering. They have their own sequence number columns defined in the db tables (Groups and Forums).

This panel actually uses built in WordPress core functionality – the same functionality WP uses in various WP admin areas.

In an attempt to save you from frustration! – have you tried ordering at individual Group level instead of using the tool that pertains to all groups and forums? On the Manage Groups and Forums panel – the button on the right of the Group rows? Might that help you here?

JG Joel Gomez
Joel Gomez
Member

Thanks Yellow Swordfish. I haven’t add new forums yet, but I did a test and clicked the button you mentioned… the forums appear in their intended order. I’ll be using this button instead of the “Order Groups and Forums” option next time.

IK Ike
Ike
Member

Glad it works, we can try and help figuring out what the actual problem is with the drag and drop if you wanted to look further in to it, it might just take disabling WP plugins.

MB Matthew BuPane
Matthew BuPane
Member

I seem to be having the same problem. Whenever I create a new forum, whether a parent forum or a sub-forum in any group, my forums reorganize themselves in the order I created them within that parent.

I’ve disabled all plugins except for Simple Press and tries a couple different themes as well. I also tried the suggestion above and that did not solve the problem.

Since my desire is to have all of the forums alphabetical this is a bit cumbersome to go reorganize everything anytime I make a new forum, which I do frequently.

Are there any other ideas on what could be causing the problem, or is there a way I can force the forum to always sort my forums alphabetically?

Thanks in advance!

IK Ike
Ike
Member

Hey Matthew,

Just out of interest have you tried using a different browser?

MB Matthew BuPane
Matthew BuPane
Member

Thanks for the reply! Sorry I am just writing back now, I was out to lunch.

Chrome and Internet Explorer

What triggers the problem is I go to add a new forum, doesn’t matter if it is a top level forum, or a child forum to a parent and it does not matter which group it is added to.

When I do this, the forums all re-sort themselves in to the order I created them inside that parent, not the order I last had them set at.

For Example, let’s say I have forum A, B and C

I created them in the order of C, A and B

I re-order them to A, B and C, and they stay this way until I add a new forum, anywhere on the forum, it then re-orders them to C, A and B (The order I created them in)

The change is immediate, you can hit refresh on that forum that has those as the sub-forums and they are in the original order.

I’ve tried moving them to a different parent and back and I’ve tried moving them to a different group and back and neither of those fixed the problem. This literally happens when the new forum is /created/ so it for some reason is re-ordering everything in the admin on the creation submission.

This is a fresh install, on a fresh WordPress, just setup since about two weeks ago. I’ve used this plugin before and never had this issue so I figured I should renew my support subscription and ask you guys if you had any ideas.

Ultimately, whether it be a code change or some other method, all I am looking for is for my forums to be sorted alphabetically. That is why having to re-sort everything every time I add a new forum it is getting quite cumbersome.

YS Yellow Swordfish
Yellow Swordfish
Member

is this genuinely a recent – preferably up to date – version of SP? I can only repeat what I said above – well that and there is no way I can replicate this behaviour. I can have my forums sorted in any which way and adding a new one always just appends it to the end of the currently sorted list. It certainly has no impact on the current ones or their ordering.

I will get someone else here to test it as well.

@ike or @mr-papa – can one of you try this and see if you get different results to me?

MB Matthew BuPane
Matthew BuPane
Member

Thank you again for another reply!

This is in fact your latest version, and it was installed on a fresh, brand new WordPress. (Neither have been updated as they were both installed at the current version level)

I thought it was an odd behavior which is why I thought I’d reach out to you guys and see if you had any ideas.

To confirm, latest WordPress, latest Simple:Press, no plugins enabled (Except Simple:Press)

The interesting thing is they stay organized until a new forum is created, that is the catalyst. I spent a lot of time trying lots and lots of different things before I reached out to make sure I wasn’t missing something obvious.

For the record, as you state above, the new one created that gets added DOES get appended to the end of the list, that does work, the problem is, all the other ones get re-sorted to the order they were created as opposed to the “forum_seq” stored in the database.

IK Ike
Ike
Member

I hate to say it but I cannot replicate this either. The forums on my local test site were created one after the other and kept that way – so numerically run 1, 2, 3, 4 so to speak. If I reverse order them and add a new forum it’s simply added on the end and the reverse order is maintained. The same happens if they are jumbled..

MB Matthew BuPane
Matthew BuPane
Member

Hmm, interesting.

Of course I didn’t figure this would be an easy to solve problem given the nature of it.

When I used this plugin in the past I never had a problem, so this took me by surprise.

From what I can tell, it looks like it is reordering them based off the “Child” order in the database column. Not sure if that says anything or not, but based on what I see in the tables, that seems to be what it is re-sorting on when a new forum is created.

I guess I’ll try re-uploading the PHP files for the plugin and see if that works. I don’t know if that will change anything but it can’t hurt anything at this point.

I’ll try uploading the PHP files and see if that changes anything. I don’t know if the information provided above helps narrow anything down, but that appears to be what it is doing.

MB Matthew BuPane
Matthew BuPane
Member

Nope, re-uploading the source files didn’t seem to change anything. I even completely shutdown Apache, MySQL and rebooted the server before trying to make sure cache was purged and everything else.

 

— Update —

OK, I know what it is doing, I don’t know why, or how to fix it.

I re-ordered my forums the way I wanted them, then pulled them up on the actual site to make sure they were in the order I wanted, they were. I did a SELECT on the wp_sfforums table and sorted on group_id and forum_seq. I got the expected result, the query returned everything in the order I see it on the page itself.

I looked over at the “children” column and everything is written out in the order it needs to be as well. I added another forum and everything reverted back to the unsorted order, and the “children” column now matches the unsorted order. (Even though the “forum_seq” is STILL correct, and it doesn’t update the “forum_seq” until I use the tool to re-sort and re-order the forums)

I manually updated the “children” column and swapped two of the forums I was having issues with. When I refreshed my page, they were in the order I wanted. Hooray, except the moment I add another forum it regenerates that “children” column (even if it is added to a completely unrelated forum) and it regenerates it back to the order they were created in.

I have absolutely no idea if any of this helps identify the issue, but I thought I would pass it along.

 

— Additional Update —

After I re-order the forums, I looked at the “children” column and it IS updating to match the to the order the columns need to be in. What I can for a fact say is happening (and I don’t know why) when a new forum is created it regenerates that “children” column to the original order the forums were created in. When I add a new forum, and see the forums are out of order again, that “children” column is back exactly the way it was before I re-ordered the columns.

YS Yellow Swordfish
Yellow Swordfish
Member

Let’s step back a little please.

Right at the top you said that this behaviour happened with both normal forums and sub-forums so I tested with forums and I suggest Ike did as well. I find no problem.

In these later posts you fix on the ‘children’ column so that suggests this problem actually exists in sub-forums. I find no problem here either. But – I have been testing with the admin management of forums and making sure the ordering in the database is correct – which it seems to be no matter what I do. the order of the children array has no bearing on the display order which is, as you have noticed, controlled by the forum_seq column.

What I DO see and did not gather from your descriptions – is a mis-ordering of sub-forums (and ONLY sub-forums) when shown in forum view on the front end, They are correctly ordered in the Group View but yes – seem to be ordered on ID in the Forum View. I don’t know if we are now talking about the same thing now or not but this is the only point I can detect any issue and will open a bug report to get it fixed up ASAP.

YS Yellow Swordfish
Yellow Swordfish
Member

OK – lots of investigation later and we do seem to be missing a sort operation in a couple of places.

If you are willing and comfortable doing so, I can give you some small code edits to try out…

MB Matthew BuPane
Matthew BuPane
Member

Thank you so much for the reply, and I want you to know I TRULY appreciate your help!

Yes, perhaps I mixed up my terminology trying to give you as much information as possible. Sometimes my mind moves much faster than I can type (even though I type pretty fast) and even in re-reading it before I post, I see what I want and it doesn’t always say what I meant it to say. 

The actual top levels forums, the ones with no parent and are on the front page with all the groups DO NOT resort. So, these are fine.

All forums that are a child object of one of those top level forums are the ones that get re-sorted every time a new forum is added. They get re-sorted to the order they were created in, and have to be re-ordered every time a new one is added. It does not matter whether a top level forum is added, or a sub-forum, the end result is the same.

I am more than happy to try out code edits for you, let me know what you’d like me to do and I am happy to help in any way possible.

Thanks again guys, I really appreciate it!