Page 2 of 3
Re: object notes component stopped working with 2011R1.8
Posted: Wed Nov 23, 2011 7:53 am
by CBoekhuis
Hi Mike,
The object notes tab is functional again, great work!
As for the history tab, that didn't solve it, but that wasn't the scope of this post as far as I'm concerned.
I could start a new post for that problem if you like?
Hans
Re: object notes component stopped working with 2011R1.8
Posted: Wed Nov 23, 2011 10:10 am
by mguthrie
Just to be safe, can you try reinstalling the history tab component and see if it shows up? The fix *should* have fixed both, and it did in our local tests.
Re: object notes component stopped working with 2011R1.8
Posted: Wed Nov 23, 2011 11:33 am
by CBoekhuis
I did reinstall the history component, but still the same problem.
For clarification, when both components are installed and as soon as I click the "save" button after entering text in the objects note tab, The frame in the browser turns blank. When I go back in the the object notes tab, the text I entered has disappeared (not saved). This doesn't happen when the history component is not installed.
Re: object notes component stopped working with 2011R1.8
Posted: Wed Nov 23, 2011 12:43 pm
by mguthrie
The history tab component is a community developed component. Can you run:
And then attempt to recreate the blank page. When PHP has a fatal error, it produces a blank page in the browser and outputs error messaging to the apache log.
Re: object notes component stopped working with 2011R1.8
Posted: Wed Nov 23, 2011 10:02 pm
by Box293
What a great thread, I get a fix for a problem and also discover another problem for the History tab I created
I've had a bit of a play and it seems that the problem occurs when using Firefox (my version is 7.0.1).
When I use IE9 it seems to work OK. However when I tried IE7 the problem occurred.
This is going to push my php skill to the limit working this out.
Mike,
No errors recorded in /var/log/httpd/error_log. Any ideas how I can track down the source of the problem?
Re: object notes component stopped working with 2011R1.8
Posted: Thu Nov 24, 2011 3:25 am
by CBoekhuis
Confirmed, I use firefox 7.0.1 and IE 7.0.5730.13. In both browsers I have this "problem".
My colleague also noticed that this occurs in Firefox 8.0.1 and IE 8.0.6001.18702.
Re: object notes component stopped working with 2011R1.8
Posted: Mon Nov 28, 2011 11:56 am
by mguthrie
Hey Box293,
I think the reason you're not finding any log errors is that this wasn't a PHP issue, but a javascript issue. Here's the diff I ran for the tab fix, it was just a small change, and I'm not sure if it will help or not, but I thought I'd send it along.
Code: Select all
2011R1.8 - 10/28/2011
Index: C:/Users/mguthrie/SVN/nagiosxi/trunk/nagiosxi/basedir/html/includes/components/xicore/status-object-detail.inc.php
===================================================================
--- C:/Users/mguthrie/SVN/nagiosxi/trunk/nagiosxi/basedir/html/includes/components/xicore/status-object-detail.inc.php (revision 880)
+++ C:/Users/mguthrie/SVN/nagiosxi/trunk/nagiosxi/basedir/html/includes/components/xicore/status-object-detail.inc.php (revision 881)
@@ -39,6 +39,7 @@
);
do_callbacks(CALLBACK_SERVICE_TABS_INIT,$cbdata);
$customtabs=grab_array_var($cbdata,"tabs",array());
+ //echo "CUSTOMTABS:<BR>";
//print_r($customtabs);
// save this for later
@@ -79,7 +80,7 @@
<br clear="all">
<script type="text/javascript">
- $(function() {
+ $(document).ready(function() {
$("#tabs").tabs();
});
</script>
@@ -105,7 +106,7 @@
foreach($customtabs as $ct){
$id=grab_array_var($ct,"id");
$title=grab_array_var($ct,"title");
- echo "<li><a href='#tab-custom-".$id."' class='ui-tabs-hide'>".$title."</a></li>";
+ echo "<li><a href='#tab-custom-".$id."'>".htmlentities($title)."</a></li>";
}
?>
</ul>
You should have a javascript error console in your browser somewhere, use that to see if you have any javascript errors. (I should warn you, debugging javascript is a pain). I'll try and jump in on this as well when I get through the support threads, we're still playing catch-up from the holiday ; )
Re: object notes component stopped working with 2011R1.8
Posted: Mon Nov 28, 2011 2:15 pm
by mguthrie
Hey Box293,
I'm pretty sure I found the issue. There were two issues with the history tab.
- a <link> tag in the html body, these can only go in the head of an html document
- an unclosed <form> tag, so any tabs that were after the history tab broke because it thought it was part of the same form
Patched version below, go ahead and test it out and see if this fixed it.
Changes on historytab.inc.php line 935 and 212
Re: object notes component stopped working with 2011R1.8
Posted: Mon Nov 28, 2011 5:29 pm
by Box293
Awesome thanks for that, I'll have a look tonight.
Much appreciated.
Re: object notes component stopped working with 2011R1.8
Posted: Tue Nov 29, 2011 7:06 am
by CBoekhuis
That works! Thank you all for fixing this issue, now we don't have to make a choice between which component to use

.
Greetings,
Hans