Cacti – Superlinks not working
After upgrading Cacti, like shown in the previous post, the Superlinks plugin stopped working correctly. When opening a Superlink tab I got a blank page in Google Chrome or a half page in Internet Explorer and Opera, like shown below.
After some Googling I found the solution for this problem on a Cacti forum. The solution describes change some scripting within the file superlinks.php. The changes are displayed below.
Replace
print ‘<iframe src=”‘ . $page[‘contentfile’] . ‘” width=”100%” height=”100%” frameborder=”0″></iframe>’;
by
print ‘<iframe id=”frame” src=”‘ . $page[‘contentfile’] .'” width=”100%” height=”100%” frameborder=”0″></iframe>’;
print “<script type=’text/javascript’>
function resizeIframe() {
var height=window.innerWidth;//Firefox
if (document.documentElement.clientHeight) {
height=document.documentElement.clientHeight;//IE
};
document.getElementById(‘frame’).style.height=parseInt(height-document.getElementById(‘frame’).offsetTop-72)+’px’;
};
document.getElementById(‘frame’).onload = resizeIframe;
window.onresize = resizeIframe;
</script>”;
Superlinks is working fine again after applying the change.
René Jorissen
Latest posts by René Jorissen (see all)
- MacOS Big Sur and SSLKEYFILELOG - November 23, 2021
- ClearPass, Azure AD, SSO and Object ID - August 12, 2021
- ClearPass – custom MPSK - July 20, 2021