How to Fix Double sqlReports Tabs

If you're seeing double tabs for sqlReports on the System Reports page, it may be due to one of the following.  The first reason is mentioned in the installation guide and expanded on below.  The second reason is fairly new and only affects people in certain states.

Hard Coded and Dynamic Coded Tabs

Summary:  There is a custom /admin/reports/reporttabs.html file with sqlReports tab coding on it, plus the page fragment from sqlReports is installed which dynamically adds a second tab.  The fix is to remove the sqlReports coding from the custom reporttabs.html file.

Prior to sqlReports 4.3, one had to customize the reporttabs.html file with html coding to make the tab appear.   The reason why was because page fragments weren't a part of PS prior to the release of sqlReports 4.3 and so users had to customize the reporttabs.html page with coding to create the sqlReports 4 tab.  Starting with sqlReports 4.3, the plugin install has included a page fragment file which dynamically adds the tab.  If one has the reporttabs.html file customized with sqlReports coding, plus has the plugin installed, two tabs can appear.

Another issue related to the reporttabs.html file relates to the addition of a custom insertion point to it by PS starting with PS 7.11.  The dynamic tab coding was redone in sqlReports 4.4 with a new page fragment that took advantage of the new custom insertion point on the reporttabs.html page.  Like above, two tabs could appear if one had the reporttabs.html page customized with sqlReports tab coding and installed the plugin, which added the second tab.  However, some users didn't see a second tab because their custom reporttabs.html page was missing the insertion point coding, especially if they had the old custom reports bundle installed, which had users replace the reporttabs.html page with a custom version without the insertion point coding.  In those cases, if a person decided to add the insertion point coding to the custom reporttabs.html page, the second tab would then appear due to the insertion coding being in place.

As mentioned above, the fix for either issue is to remove any sqlReports coding on the custom reporttabs.html page and let the page fragment add the coding instead.  If you're using CPM and you don't see a custom reporttabs.html page, be sure that one doesn't exist in the custom web root folder.

Old Page Fragment Coding

Summary:  There is no sqlReports coding on a custom reporttabs.html page, however, a version prior to sqlReports, July 1, 2015 (anything prior to the release of 4.6 on that date), is in use or an old page fragment to add the tab is in use.  The fix is to upgrade to the latest version of sqlReports, or if nothing else, install the latest page fragment.  This issue first came to light with users in Nebraska and Tennessee and has to do with those states having a slightly different reporttabs.html file.  Users in Michigan have also mentioned the issue and other states may be affected as well.

In versions prior to July 1, 2015, a page fragment added the sqlReport tab using some javascript coding that looked for a command called ul class="tabs" on the reporttabs.html file.  It then placed the sqlReports tab toward the end of the ul class coding.  In Nebraska, Tennessee and Michigan, PS has redone the core reporttabs.html page and there are two references to ul class="tabs" on their version of reporttabs.html, thus causing the older sqlReports page fragment to execute it's coding twice and create two sqlReports tabs.  sqlReports 4.7 does not have javascript coding on it's page fragment, so users on it will not see the double tabs.

As mentioned above, the fix is to correct the page fragment.  Either upgrade to the latest version of sqlReports or use the page fragment from the latest download.  The page fragment is in the /admin/reports folder and called reporttabs.sqlreports4.report.tabs.txt.


If you have double tabs and neither of these situations seem to be the reason why, please contact Matt for troubleshooting help and please include details on your setup (version of sqlReports installed, PS version, state, etc.).