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

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
rockedge
Posts: 1098
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

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

Post by rockedge » Sat Sep 03, 2016 6:14 pm

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.
Last edited by rockedge on Sun Sep 04, 2016 7:38 pm, edited 1 time in total.

rockedge
Posts: 1098
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Fatal error when Control is selected in Montage view

Post by rockedge » Sun Sep 04, 2016 4:44 am

I have found a description of the problem here : viewtopic.php?t=24692
and will try the same fix.

rockedge
Posts: 1098
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Fatal error when Control is selected in Montage view

Post by rockedge » Sun Sep 04, 2016 7:37 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests