In the osTicket "loop," where is the global $ost supposed to be instantiated?  In my plugin when I include header.inc.php, I get,Fatal error: Call to a member function getError() on a non-object in D:\intranet\osticketdev\include\staff\header.inc.php on line 59That line is $ost->some method.  I'm missing an include somewhere, I think, but I don't know what or where.  print_r ($ost) is blank anywhere on the header page.

Version of osTicket?This may point you in the right direction:https://github.com/osTicket/osTicket/issues/2902

1.9.13 has not been released yet.  You should not be running it.But the github link should point you in the right direction for $ost

I tried it.  It did not help. Somewhere the globals are not in the function needed to run it.  I've put it in my controller method and that helped, but I'm running across more globals.$tabs=$nav->getTabs()Fatal error: Call to a member function getTabs() on a non-object in D:\intranet\osticketdev\include\staff\templates\navigation.tmpl.php on line 2I added this to my controller's method:global $ost, $thisstaff, $nav;So far this has worked for the objects.  I don't know that's the correct way you want plugins made, but it works.

Well its probably because your running 1.9.13.  But thanks for letting us know.

Write a Reply...