Page 1 of 1

Fatal error when Control is selected in Montage view(SOLVED)

Posted: Sat Sep 03, 2016 6:14 pm
by rockedge
When clicking the Control menu link in the Montage view with 4 cameras 1 being PTZ. These errors appear:

Code: Select all

Notice: Undefined index: mid in /usr/share/zoneminder/www/skins/classic/views/control.php on line 33
and :

Code: Select all

Fatal error: Call to a member function CanFocus() on a non-object in /usr/share/zoneminder/www/skins/classic/includes/control_functions.php on line 362
the PTZ controls work fine in a Single Camera view.

Re: Fatal error when Control is selected in Montage view

Posted: Sun Sep 04, 2016 4:44 am
by rockedge
I have found a description of the problem here : viewtopic.php?t=24692
and will try the same fix.

Re: Fatal error when Control is selected in Montage view

Posted: Sun Sep 04, 2016 7:37 pm
by rockedge
I was able to fix the problem using this fix.
SpyderG wrote:By changing the 1.29 version of control_functions to cast the $monitor array as an object in ptzControls and removing the open/close brackets from object variables it works fine. e.g changed... if ( $monitor->CanZoomCon() ) to if ( $monitor->CanZoomCon ).

Code: Select all

 $monitor = (object) $monitor;
I had to add this line and and remove the open/close brackets from object variables in these functions in /skins/classic/includes/control_functions.php:
functions: controlPresets, controlPower, ptzControls
and in /skins/classic/views/control.php changed line 33 from:

Code: Select all

$mid = validInt($_REQUEST['mid']);
to

Code: Select all

if (isset($_REQUEST['mid'])){ $mid = validInt($_REQUEST['mid']); }
and then the PTZ controls window opens in the Montage view.