IssueDAO->getCurrent not returning consistent results

Hi All,

I am attempting to add a new menu item to the primary nav. The new nav looks something like this:

all-issues-nav.PNG

It basically just shows the latest issue along with the four most recent articles from any issues. The modifications I have made to the primaryNavMenu.tpl will only render the new menu item IF $issue is set. The menu displays correctly for most pages, however for some it does not display at all because $issue is not set, and for others it will display the wrong issue because the current issue value is not the same as the most recent issue for some reason.

If I am viewing any issue that is NOT the current issue, then the $issue value differs and will be set to match the issue being viewed, i.e. the menu entry should be showing Vol 1 Issue 2 because that is the current issue but viewing Vol 1 Issue 1, the older issue, will show that issue in the menu as being the current one:

wrong-issue.PNG

My question is: How can I reliably get the current issue value and make that value available to all pages on the frontend, not just some of the pages?

I am using the latest version of OJS 3.3.0.10

Many thanks in advance,

Anthony