Author Topic: Bug report: Wrong URL for default page or first page  (Read 1063 times)

Offline freeSbee

  • Posts: 1117
    • BAKERY - Website Baker shop module
Bug report: Wrong URL for default page or first page
« on: March 25, 2016, 06:59:51 PM »
Hi all

Strange behavior in WB version 2.8.3 SP6 / Revision 1645 when showing the page menu using the native show_menu() function.

Initial situation

I have defined a page tree as follows:

FirstLevelPage1
    SecondLevelPage1
    SecondLevelPage2
    SecondLevelPage3
    SecondLevelPage4
FirstLevelPage2
[and so on …]


Result

To my surprise the page URLs look as follows.
WB takes the first sublevel page as default page instead of the first firstlevel page.

www.example.com/pages/firstlevelpage1.php
    www.example.com
    www.example.com/pages/firstlevelpage1/secondlevelpage2.php
    www.example.com/pages/firstlevelpage1/secondlevelpage3.php
    www.example.com/pages/firstlevelpage1/secondlevelpage4.php
www.example.com/pages/firstlevelpage2.php
[and so on …]


Expected result

www.example.com
    www.example.com/pages/firstlevelpage1/secondlevelpage1.php
    www.example.com/pages/firstlevelpage1/secondlevelpage2.php
    www.example.com/pages/firstlevelpage1/secondlevelpage3.php
    www.example.com/pages/firstlevelpage1/secondlevelpage4.php
www.example.com/pages/firstlevelpage2.php
[and so on …]


Fix

class frontend
function page_select()
about line 95

Replace
Code: [Select]
. ' ORDER BY  `p`.`position` ASC';by
Code: [Select]
. ' ORDER BY  `level`, `p`.`position` ASC';
Regards Christoph