weex / phpBMS

web-based, free, business management software
http://phpbms.org
BSD 3-Clause "New" or "Revised" License
24 stars 12 forks source link

Cannot add submenu, if Category name is changed. #20

Closed ssean closed 13 years ago

ssean commented 13 years ago

If you change any of the category names (Clients, Sales, Product, Tools, etc) you can no longer add sub menus to those Categories.

See the attached screenshot for clarity. Notice that the categories I renamed, are no longer available on the drop down list.

http://phpbms.com/forum/download/file.php?id=24&sid=5aaa36045bd8b80a01455c7e1214f775

weex commented 13 years ago

I tried this with a test install and I couldn't get it to fail as you show. The code that creates that list is in modules/base/include/menu.php and is below. If you look at the menu table would any of the where conditions here not be satisfied?

function displayParentDropDown($selectedpid, $uuid){

                    $querystatement = "
                            SELECT
                                    `uuid`,
                                    `name`
                            FROM
                                    `menu`
                            WHERE
                                    `uuid` != '".$uuid."'
                                    AND
                                    (`parentid` = '' OR `parentid` IS NULL)
                                    AND
                                    (
                                            link=''
                                            OR
                                            link IS NULL
                                    )
                            ORDER BY
                                    `displayorder`;
                            ";
ssean commented 13 years ago

When I open the Menu table in phpmyadmin, some are missing Names.

http://www.phpbms.org/forum/download/file.php?id=25

weex commented 13 years ago

Those all have parentid (which means they are an item inside a menu) and are most likely the separator lines in the menus. Do you see your items that should be appearing but are not? If you can post the same info for those I should be able to confirm or deny the bug. Thanks!