Advertisement:

Author Topic: [2.0.13] Ordering of categories and boards when using InnoDB tables.  (Read 2933 times)

Offline gnif

  • Newbie
  • *
  • Posts: 2
Forum version: SMF 2.0.13
Issue: When using InnoDB tables on smf_categories the board index is not ordered according to the cat_order column.
Fix:

Sources/Subs-BoardIndex.php, line 42 add:
Code: [Select]
        $order = ' ORDER BY ';
        if ($boardIndexOptions['include_categories'])
                $order .= ' c.cat_order, ';
        $order .= 'b.board_order';

line 71 change to:
Code: [Select]
                        AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)) . $order

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,980
    • StoryBB/StoryBB on GitHub
Re: [2.0.13] Ordering of categories and boards when using InnoDB tables.
« Reply #1 on: March 24, 2017, 04:35:51 AM »
I thought this was solved back in 2.0.8 or so by forcing the query to use the board order since that should include the categories naturally.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,826
  • Gender: Male
    • Kindred-999 on GitHub
Re: [2.0.13] Ordering of categories and boards when using InnoDB tables.
« Reply #2 on: March 24, 2017, 11:44:31 PM »
I am pretty sure it is solved, since I have several of my databases in InnoDB and don't have this issue
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 1,824
    • sbulen on GitHub
Re: [2.0.13] Ordering of categories and boards when using InnoDB tables.
« Reply #3 on: February 13, 2020, 10:42:26 PM »
This one has definitely been solved...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp