Bug #7889
closedThe dropdown tabs replacement fallback needs to be limited to certain pages
100%
Description
AFAICT, this was designed to aid systems with lots of interfaces, and intended for places such as Firewall - Rules. Instead, you can hit it anywhere (have seen it e.g. with Suricata XMLRPC Sync tab). With translations coming, this is a major problem, you cannot just be translating things to fix a hardcoded combined limit of characters.
Example of this breaking Status - System Logs page with Vietnamese translation @ https://forum.pfsense.org/index.php?topic=137004.0
Updated by Bill Meeks over 6 years ago
To add another note to the conversation. There is a parameter in the display_top_tabs() function that is supposed to prevent the creation of the drop-down at all. However, that parameter is commented out as always "false" in the current code, so using a call like this --
display_top_tabs($tab_array, true);
which is supposed to prevent the drop-down display and instead force tabs is ignored.
Bill
Updated by Anonymous over 6 years ago
Thanks Bill. I will try to determine why that change was made.
Updated by Anonymous over 6 years ago
Which line are the comments on? I don't see any.
Updated by Bill Meeks over 6 years ago
Found it. Had to go back and think about it a minute. It's in the pkg_edit.php file in this code near the bottom of the file --
if (isset($tab_array)) { foreach ($tab_array as $tabid => $tab) { display_top_tabs($tab); //, $no_drop_down, $tabid); } }
So this only happens when using XML templates as the GUI page file. I was wrong, it's not in the actual display_top_tabs() function. It is instead in the pkg_edit.php code.
Bill
Updated by Anonymous over 6 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 5f63cb40ca75f055f85427e78d9e2348b65b05c4.
Updated by Kill Bill over 6 years ago
That works (for the pkg.php/pkg_edit.php as well) provided the limit stays high-enough.
Should the no-op no_drop_down code perhaps be nuked from those two pkg*.php files altogether? Apparently only used in Suricata and Snort and not really needed any more, plus never worked - seems like the functionality has been killed at the very beginning of the bootstrap conversion: https://github.com/pfsense/pfsense/commit/23f6cdd72757350d8c25cf9536c7d7dafc6fca16
Updated by Anonymous over 6 years ago
Yes; it should be nuked. I'd like to wait until after the 2.4 release before doing that, however.
Updated by Kill Bill over 6 years ago
Steve Beaver wrote:
Yes; it should be nuked. I'd like to wait until after the 2.4 release before doing that, however.
Ok, https://github.com/pfsense/pfsense/pull/3838 after release.
Updated by Bill Meeks over 6 years ago
Pull requests have been submitted for removing the use of the <no_drop_down> tag on the SYNC tab in both the Snort and Suricata packages.
Snort update: https://github.com/pfsense/FreeBSD-ports/pull/425
Suricata update: https://github.com/pfsense/FreeBSD-ports/pull/426
Bill