Can't create new filter

Forum for questions and support relating to 1.33.x development only.
Post Reply
bargaroth
Posts: 2
Joined: Fri Aug 16, 2019 3:29 pm

Can't create new filter

Post by bargaroth » Fri Aug 16, 2019 3:32 pm

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.

bargaroth
Posts: 2
Joined: Fri Aug 16, 2019 3:29 pm

Re: Can't create new filter

Post by bargaroth » Fri Aug 16, 2019 7:07 pm

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'

User avatar
iconnor
Posts: 1377
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Can't create new filter

Post by iconnor » Sat Aug 17, 2019 8:20 pm

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

rossbcan
Posts: 13
Joined: Tue Aug 20, 2019 1:25 pm

Re: Can't create new filter

Post by rossbcan » Thu Aug 22, 2019 8:15 pm

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

rossbcan
Posts: 13
Joined: Tue Aug 20, 2019 1:25 pm

Re: Can't create new filter

Post by rossbcan » Thu Aug 22, 2019 8:28 pm

nevermind - select database "zm"
mysql zm < /usr/share/zoneminder/db/zm_update-1.33.14.sql

Rajstopy
Posts: 10
Joined: Fri Sep 13, 2019 3:52 pm

Re: Can't create new filter

Post by Rajstopy » Tue Sep 17, 2019 11:09 am

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

MalakymR
Posts: 5
Joined: Wed Apr 12, 2017 7:20 pm

Re: Can't create new filter

Post by MalakymR » Wed Sep 18, 2019 10:58 am

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/

User avatar
iconnor
Posts: 1377
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Can't create new filter

Post by iconnor » Wed Sep 18, 2019 2:11 pm

If teh filters page is blank then there is an error happening. Check apache logs.

benoit34
Posts: 6
Joined: Tue Aug 13, 2019 5:34 pm

Re: Can't create new filter

Post by benoit34 » Sat Sep 21, 2019 11:39 am

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,

benoit34
Posts: 6
Joined: Tue Aug 13, 2019 5:34 pm

Re: Can't create new filter

Post by benoit34 » Sun Sep 22, 2019 8:00 pm

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))

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest