Page 1 of 1

Can't create new filter

Posted: Fri Aug 16, 2019 3:32 pm
by bargaroth
Hello,

I updated Zoneminder to the version 1.33.14 on ubuntu and I am getting problems with the filters:
- I can't edit existing filters. This basically ends up on a blank page
- When I try creating a new one, it is never saved. I tried "Save", "Save As" and the result is always the same.

Do you have any idea ? I tried with Firefox and Chrome.

Regards.

Re: Can't create new filter

Posted: Fri Aug 16, 2019 7:07 pm
by bargaroth
Some other information, in the log I see:
Unable to execute 'SELECT * FROM Filters WHERE Id = ? AND( AutoArchive = 1 or AutoVideo = 1 or AutoUpload = 1 or AutoEmail = 1 or AutoMessage = 1 or AutoExecute = 1 or AutoDelete = 1 or UpdateDiskSpace = 1 or AutoMove = 1 or AutoCopy = 1 ) ORDER BY Name': Unknown column 'AutoCopy' in 'where clause'

Re: Can't create new filter

Posted: Sat Aug 17, 2019 8:20 pm
by iconnor
For some reason the 1.33.14 db update has not happened. This is the second report I've had of it... Not sure what is going on yet.

To get around it, do:

mysql -u zmuser -p zm < /usr/share/zoneminder/db/zm_update-1.33.14.sql

Re: Can't create new filter

Posted: Thu Aug 22, 2019 8:15 pm
by rossbcan
ZM-1.34: on openwrt x86_64

root@SecureOffice:~# mysql < /usr/share/zoneminder/db/zm_update-1.33.14.sql
ERROR 1046 (3D000) at line 14: No database selected

Wtf?

context: porting ZM to openwrt x86_64 part of www.rossco.org, in integration / testing phase

...Bill

Re: Can't create new filter

Posted: Thu Aug 22, 2019 8:28 pm
by rossbcan
nevermind - select database "zm"
mysql zm < /usr/share/zoneminder/db/zm_update-1.33.14.sql

Re: Can't create new filter

Posted: Tue Sep 17, 2019 11:09 am
by Rajstopy
Hi there,

I still have this strange error in /var/log/message, and still unable to start the service :

-- The unit zoneminder.service has entered the 'failed' state with result 'exit-code'.
sept. 17 13:08:28 lynx systemd[1]: Failed to start ZoneMinder CCTV recording and surveillance system.
-- Subject: L'unité (unit) zoneminder.service a échoué
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--



Sep 17 12:59:56 lynx zmfilter_2[1158]: WAR [No query in Filter!]
Sep 17 12:59:56 lynx zmfilter_2[1158]: WAR [No filter found for SELECT * FROM `Filters` WHERE `Id` = ? AND( `AutoArchive` = 1#012 or `AutoVideo` = 1#012 or `AutoUpload` = 1#012 or `AutoEmail` = 1#012 or `AutoMessage` = 1#012 or `AutoExecute` = 1#012 or `AutoDelete` = 1#012 or `UpdateDiskSpace` = 1#012 or `AutoMove` = 1#012 or `AutoCopy` = 1#012 ) ORDER BY `Name` with values(2)]
Sep 17 12:59:56 lynx zmfilter_1[1150]: WAR [No query in Filter!]
Sep 17 12:59:56 lynx zmfilter_1[1150]: WAR [No filter found for SELECT * FROM `Filters` WHERE `Id` = ? AND( `AutoArchive` = 1#012 or `AutoVideo` = 1#012 or `AutoUpload` = 1#012 or `AutoEmail` = 1#012 or `AutoMessage` = 1#012 or `AutoExecute` = 1#012 or `AutoDelete` = 1#012 or `UpdateDiskSpace` = 1#012 or `AutoMove` = 1#012 or `AutoCopy` = 1#012 ) ORDER BY `Name` with values(1)]

Raj

Re: Can't create new filter

Posted: Wed Sep 18, 2019 10:58 am
by MalakymR
We were getting the same issue too, filter edit page is blank.

Filters show errors in the log...
2019-09-18 11:55:19 zmfilter_2 9385 WAR No query in Filter! zmfilter.pl
2019-09-18 11:55:19 zmfilter_1 9379 WAR No filter found for SELECT * FROM `Filters` WHERE `Id` = ? AND( `AutoArchive` = 1 or `AutoVideo` = 1 or `AutoUpload` = 1 or `AutoEmail` = 1 or `AutoMessage` = 1 or `AutoExecute` = 1 or `AutoDelete` = 1 or `UpdateDiskSpace` = 1 or `AutoMove` = 1 or `AutoCopy` = 1 ) ORDER BY `Name` with values(1) zmfilter.pl
2019-09-18 11:55:19 zmfilter_1 9379 ERR Error parsing Sql. skipping filter 'PurgeWhenFull'
This is with MaraiDB, I have read they have changed their VALUES() to VALUE()

If I run the query without ? and VALUES() it works fine - this was on 10.1.37 and 10.3.17 which is odd as the posting shows it was updated after 10.3...

https://mariadb.com/kb/en/library/values-value/

Re: Can't create new filter

Posted: Wed Sep 18, 2019 2:11 pm
by iconnor
If teh filters page is blank then there is an error happening. Check apache logs.

Re: Can't create new filter

Posted: Sat Sep 21, 2019 11:39 am
by benoit34
Hi,
same issue on my side, on a fresh buster install (not an upgrade of zm)

Here are apache logs when accessing view=filter&Id=2 :

==> error.log <==
[Sat Sep 21 13:35:48.850746 2019] [php7:notice] [pid 520] [client 192.168.0.10:48808] PHP Notice: Undefined property: ZM\\Filter::$Query_json in /usr/share/zoneminder/www/includes/Filter.php on line 51

==> access.log <==
192.168.0.10 - - [21/Sep/2019:13:35:48 +0200] "GET /zm/index.php?view=filter&Id=2 HTTP/1.1" 200 717 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"


I'm not very good, neither in php, neither in JSON, but maybe someone can point where it comes from ;o)

Regards,

Re: Can't create new filter

Posted: Sun Sep 22, 2019 8:00 pm
by benoit34
Oupss !!

Message from iconnor earlier in this same thread solved my issue :

mysql -u zmuser -p zm < /usr/share/zoneminder/db/zm_update-1.33.14.sql

(thx cristol to have point it to me, once again ;o))