Page 2 of 2

Re: Viewing event in zmninja causes this error..

Posted: Thu Mar 22, 2018 5:22 pm
by canbikehere
I see the same errors in mine:

Code: Select all

2018-03-22 09:14:19 Error: [ParseError] syntax error, unexpected ';', expecting ')'
Request URL: /zm/api/events/5739.json
Stack Trace:
#0 [internal function]: App::load('Group')
#1 [internal function]: spl_autoload_call('Group')
#2 /usr/share/zoneminder/www/api/lib/Cake/Utility/ClassRegistry.php(146): class_exists('Group')
#3 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(1077): ClassRegistry::init('Group')
#4 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(886): Model->_constructLinkedModel('Group', 'Group', NULL)
#5 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(919): Model->__isset('Group')
#6 /usr/share/zoneminder/www/api/lib/Cake/Model/Datasource/DboSource.php(1132): Model->__get('Group')
#7 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(3031): DboSource->read(Object(Event), Array)
#8 /usr/share/zoneminder/www/api/lib/Cake/Model/Model.php(3003): Model->_readDataSource('first', Array)
#9 /usr/share/zoneminder/www/api/app/Controller/EventsController.php(120): Model->find('first', Array)
#10 [internal function]: EventsController->view('5739')
#11 /usr/share/zoneminder/www/api/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(EventsController), Array)
#12 /usr/share/zoneminder/www/api/app/Plugin/Crud/Lib/CrudControllerTrait.php(31): Controller->invokeAction(Object(CakeRequest))
#13 /usr/share/zoneminder/www/api/lib/Cake/Routing/Dispatcher.php(193): AppController->invokeAction(Object(CakeRequest))
#14 /usr/share/zoneminder/www/api/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(EventsController), Object(CakeRequest))
#15 /usr/share/zoneminder/www/api/app/webroot/index.php(107): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#16 {main}

Re: Viewing event in zmninja causes this error..

Posted: Thu Mar 22, 2018 11:49 pm
by rockedge
that looks like some problem in the API. I have not seen this error before... did anything change as far as URL re-writes goes?

Re: Viewing event in zmninja causes this error..

Posted: Fri Mar 23, 2018 12:04 am
by bbunge
You might want to try the fix Rockedge came up with for Bionic with PHP7.2. I suspect that some changes have been made to Ubuntu 17.10 in prep for 18.04.

Re: Viewing event in zmninja causes this error..

Posted: Fri Mar 23, 2018 1:24 am
by canbikehere
bbunge wrote: Fri Mar 23, 2018 12:04 am You might want to try the fix Rockedge came up with for Bionic with PHP7.2. I suspect that some changes have been made to Ubuntu 17.10 in prep for 18.04.
My environment is on 16.04 and PHP7.0, so unlikely to be related.

rockedge wrote: Thu Mar 22, 2018 11:49 pm that looks like some problem in the API. I have not seen this error before... did anything change as far as URL re-writes goes?
In my case I did nothing other than upgrading the zoneminder packages to v1.31.39.

Re: Viewing event in zmninja causes this error..

Posted: Sun Mar 25, 2018 10:54 pm
by juanmoura
I see the same errors in mine. 16.04 and PHP7.0
canbikehere wrote: Fri Mar 23, 2018 1:24 am
bbunge wrote: Fri Mar 23, 2018 12:04 am You might want to try the fix Rockedge came up with for Bionic with PHP7.2. I suspect that some changes have been made to Ubuntu 17.10 in prep for 18.04.
My environment is on 16.04 and PHP7.0, so unlikely to be related.

rockedge wrote: Thu Mar 22, 2018 11:49 pm that looks like some problem in the API. I have not seen this error before... did anything change as far as URL re-writes goes?
In my case I did nothing other than upgrading the zoneminder packages to v1.31.39.

Re: Viewing event in zmninja causes this error..

Posted: Mon Mar 26, 2018 5:58 pm
by canbikehere
If I try requesting the same URL directly (in my error log above it was /zm/api/events/5739.json) I get the same error, so this is definitely an API issue as opposed to a ZMNinja issue...

Re: Viewing event in zmninja causes this error..

Posted: Mon Mar 26, 2018 6:44 pm
by asker
Yup its an API issue with Isaac's Storage Areas branch. I've let him know.
https://github.com/connortechnology/Zon ... /issues/90

Re: Viewing event in zmninja causes this error..

Posted: Tue Mar 27, 2018 8:01 am
by asker
The problem was with an invalid Group Model. It was partially coded. I've commented it out. See https://github.com/connortechnology/ZoneMinder/pull/91

Updated: Its merged so if you pull and build, you should have the API working