$dont_show_menu_if_only_one_item not being honoured

deep64blue

DaDaBIK Guru
With only one menu item the menu does not appear regardless of if $dont_show_menu_if_only_one_item is set to 1 or 0.

Behaviour observed in 11.5 and 11.6

Details (note Enterprise is missing an r in the 'Enterprise to Platinum' line):-
Your current DaDaBIK version
You are using DaDaBIK version 11.6-Elba enterprise, installed on Jun 14, 2022 (installation code: 1801462a86c096f2b4), the latest version of DaDaBIK is 11.6-Elba released on Jun 14, 2022

You are running the latest release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enteprise to Platinum) please contact us.

System info
PHP Version: 7.4.29

mysql version: 5.5.5-10.4.24-MariaDB

Web server: Apache/2.4.53 (Unix) OpenSSL/1.1.1n PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1

Client: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36

URL installation: http://localhost/WebRoot/dev/hofsites/public_html/civ4new/
 

eugenio

Administrator
Staff member
You are right, thanks for having reported it.

Temporary fix

In include/header.php change:

<?php if ($menu_type === 'drop_down_menu' || isset($menu_items_ar) && count($menu_items_ar) <= 1){ ?>

with:

<?php if ($menu_type === 'drop_down_menu' || isset($menu_items_ar) && count($menu_items_ar) <= 1 && $dont_show_menu_if_only_one_item === 1){ ?>

The fix will be available in the next release.

Best,
 
Top