Bug #7889
closed
The dropdown tabs replacement fallback needs to be limited to certain pages
Added by Kill Bill over 6 years ago.
Updated over 6 years ago.
Affected Architecture:
All
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
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
Thanks Bill. I will try to determine why that change was made.
Which line are the comments on? I don't see any.
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
- Status changed from New to Feedback
- % Done changed from 0 to 100
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
Yes; it should be nuked. I'd like to wait until after the 2.4 release before doing that, however.
- Status changed from Feedback to Resolved
Also available in: Atom
PDF