Camera Preset Buttons not Working

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
ronw
Posts: 4
Joined: Wed Apr 22, 2020 7:06 pm

Camera Preset Buttons not Working

Post by ronw »

When I press the camera preset button I get the following error

2020-04-30 09:05:03 zmcontrol_3 3570 ERR Can't access name:1 AUTOLOAD:ZoneMinder::Control::FI8918W::1 member of object of class ZoneMinder::Control::FI8918W from main:186 zmcontrol.pl

The move buttons work but not the preset or set preset. It appears to me that the button press is not being passed back to the script correctly. I reviewed the script and when I send the command as structured to the camera it works. Since I am not a programmer I do not have a clue where to start. Any help is appreciated!
dpdjvan
Posts: 7
Joined: Sat Apr 09, 2016 2:39 pm

Re: Camera Preset Buttons not Working

Post by dpdjvan »

I found the same issue as I use them all the time.

I posted a question as well here: viewtopic.php?f=40&t=29343&sid=c692bbd4 ... 3c3b1476c8
dpdjvan
Posts: 7
Joined: Sat Apr 09, 2016 2:39 pm

Re: Camera Preset Buttons not Working

Post by dpdjvan »

I found a solution that worked for me.

In /usr/share/zoneminder/www/skins/classic/includes/control_functions.php goto line 165.

Change the line to:
<button type="button" class="ptzNumBtn" title="<?php echo isset($labels[$i])?htmlentities($labels[$i]):'' ?>" data-on-click-this="controlCmd" value="<?php echo $cmds['PresetGoto'] ?><?php echo $i ?>"><?php echo $i ?></button>

This removes setting the first setting of "value" which seems to be causing the issue.
ronw
Posts: 4
Joined: Wed Apr 22, 2020 7:06 pm

Re: Camera Preset Buttons not Working

Post by ronw »

Thanks dpdjvan, that worked perfectly!
Post Reply