Topic: tab dissapears when enter a link
Hi there! I'm working with FA 2.3.1 and I have found a strange behavior with extensions.
When I enter to one tab or login my created tab is visible without a problem.
If I enter to a link (Setup/Company Setup) then the tab dissapears (there is no text) and links to nothing, like this:
<li ><a href='./index.php?application=orders'><b>Ventas</b></a></li>
<li ><a href='./index.php?application=AP'><b>Compras</b></a></li>
<li ><a href='./index.php?application=stock'><b>Productos e Inventarios</b></a></li>
<li ><a href='./index.php?application=manuf'><b>Manufactura</b></a></li>
<li ><a href='./index.php?application=GL'><b>Contabilidad y Bancos</b></a></li>
<li ><a href='./index.php?application='><b></b></a></li>
<li class='active'><a href='./index.php?application=system'><b>Configuración</b></a></li>
I had review the code and I can see that when you enter a tab install_tabs is called,
on the other hand, If you enter a link install_tabs is not called even the hook object is created.
To solve this issue I have to add these lines to the file session.inc line 300
if (!isset($_SESSION['App'])) {
$_SESSION['App'] = new front_accounting();
$_SESSION['App']->init();
} else { // line added
$_SESSION['App']->init(); // line added
}
In this way the method install_tabs of my hook is called when I enter a link and when I enter a tab.
I hope this could help others.