Broken v1.37.18 - ONVIF_Alarm_Txt

Current Development version likely to have breaking changes
Post Reply
User avatar
lyallp
Posts: 137
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Broken v1.37.18 - ONVIF_Alarm_Txt

Post by lyallp »

Language translation issue I suspect.
I found this text in two places.

Code: Select all

/usr/share/zoneminder/www/lang/es_la.php:    'ONVIF_Alarm_Txt'      => 'Texto Alarma ONVIF', //added 18/07/2022
/usr/share/zoneminder/www/skins/classic/views/monitor.php:              <td class="text-right pr-3"><?php echo translate('ONVIF_Alarm_Txt') ?></td>
Results in log messages of

Code: Select all

Jul 21 09:35:13 Lyalls-PC zmc_dvideo0[17314]: ERR [zmc_dvideo0] [Can't run query: Unknown column 'ONVIF_Alarm_Txt' in 'field list']
Jul 21 09:35:13 Lyalls-PC zmc_dvideo0[17314]: ERR [zmc_dvideo0] [Can't load local monitors: Unknown column 'ONVIF_Alarm_Txt' in 'field list']
Jul 21 09:35:13 Lyalls-PC zmc_dvideo0[17314]: ERR [zmc_dvideo0] [No monitors found]
Jul 21 09:35:13 Lyalls-PC zmdc[17224]: ERR ['zmc -d /dev/video0' exited abnormally, exit status 255] 
...Lyall
Aen5quai
Posts: 7
Joined: Wed Nov 16, 2011 11:36 am

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by Aen5quai »

I've this issue too
Centos7

Code: Select all

zoneminder-httpd-1.37.18-1.70.20220720gitg95530a4f7.el7.x86_64
zoneminder-common-1.37.18-1.70.20220720gitg95530a4f7.el7.x86_64
zoneminder-1.37.18-1.70.20220720gitg95530a4f7.el7.x86_64

[root@www db]# ls -al zm_update-1.37.1*
-rw-r--r--. 1 root root  449 май 18 20:03 zm_update-1.37.10.sql
-rw-r--r--. 1 root root  509 май 18 20:03 zm_update-1.37.11.sql
-rw-r--r--. 1 root root 2689 май 18 20:03 zm_update-1.37.12.sql
-rw-r--r--. 1 root root  561 май 18 20:03 zm_update-1.37.13.sql
-rw-r--r--. 1 root root   96 май 18 20:03 zm_update-1.37.14.sql
-rw-r--r--. 1 root root  457 май 18 20:03 zm_update-1.37.15.sql
-rw-r--r--. 1 root root  254 май 18 20:03 zm_update-1.37.16.sql
-rw-r--r--. 1 root root  418 июн 18 14:35 zm_update-1.37.17.sql
-rw-r--r--. 1 root root  482 июл 13 00:34 zm_update-1.37.18.sql
-rw-r--r--. 1 root root   58 май 18 20:03 zm_update-1.37.1.sql
[root@www db]# pwd
/usr/share/zoneminder/db
[root@www db]# grep -i ONVIF_Alarm_Txt *
[root@www db]#
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by Magic919 »

Run

Code: Select all

monitors_dbupdate.sql
-
Aen5quai
Posts: 7
Joined: Wed Nov 16, 2011 11:36 am

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by Aen5quai »

Code: Select all

whereis monitors_dbupdate.sql; echo $?
monitors_dbupdate:0

Code: Select all

zmupdate.pl 

Database already at version 1.37.18, update skipped.
Whereis monitors_dbupdate.sql located?
User avatar
lyallp
Posts: 137
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by lyallp »

sort of expected zmupdate.pl to do it's job.

My Gentoo ebuild has not included this monitors_dbupdate.sql, which does not appear to conform to previous update naming standards, such as 'zm_update-1.37.9.sql'

I did, however, find this rogue sql in the git repository, arrived about 17 hours prior to this post.

Code: Select all

ALTER TABLE zm.Monitors ADD Onvif_Alarm_Txt varchar(30) DEFAULT 'MotionAlarm' NULL; 
...Lyall
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by Magic919 »

In the usual DB folder.
-
Aen5quai
Posts: 7
Joined: Wed Nov 16, 2011 11:36 am

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by Aen5quai »

Yes, that works. Thank you.

Code: Select all

wget https://raw.githubusercontent.com/ZoneMinder/zoneminder/master/db/monitors_dbupdate.sql
mysql -p zm < monitors_dbupdate.sql
systemctl restart zoneminder
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by Magic919 »

You're welcome. It's part of the joys of running the development version.

I'd suggest cloning the git repo and having a rummage through when the DB doesn't behave.
-
User avatar
lyallp
Posts: 137
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by lyallp »

My points are
1. DB changes should give a point version bump
2. DB Changes should be in the same form as previous DB changes
3. DB Changes should apply automatically with zmupdate.pl

Failure on any of these points will potentially lead to a broken release distribution, down the track, as the DB update is 'forgotten'
...Lyall
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by Magic919 »

Development version.
-
User avatar
lyallp
Posts: 137
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by lyallp »

Which is the precursor to a release version.
...Lyall
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by Magic919 »

No, it’s not at all. This is a different branch.

You’d be running the ‘proposed’ version if you want the one that’s just about to be the next release.
-
User avatar
lyallp
Posts: 137
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by lyallp »

Ok, it's just that all previous updates of Zoneminder dealt with database updates in the manner described earlier.
If this is the way it is, then it's the way it is.
...Lyall
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by iconnor »

Some fixes pushed. 1.37.19 should handle the update correctly. Of course I probably missed something or screwed something up. We will find out shortly.
User avatar
lyallp
Posts: 137
Joined: Fri Nov 26, 2010 2:36 am
Location: Adelaide, Australia

Re: Broken v1.37.18 - ONVIF_Alarm_Txt

Post by lyallp »

Broke it again.
Was

Code: Select all

ONVIF_Alarm_Txt
now it's

Code: Select all

 ONVIF_Alarm_Text
...Lyall
Post Reply