You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed your instructions to update the EventsController.php to the latest unreleased version in your FAQ wiki and it started causing the SQL error at the bottom of this message. The issue is that the ZM team added some code on May 7-8, 2018 and it incorrectly queries the db. Maybe change the FAQ post to point to the Dec 19 EventsController.php commit.
SQL Error:
2018-07-21 14:10:29 Error: [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synta
x to use near 'fileExists' at line 1
Request URL: /api/events/93.json
Stack Trace:
#0 /usr/local/www/zoneminder/api/lib/Cake/Model/Datasource/DboSource.php(461): PDOStatement->execute(Array)
#1 /usr/local/www/zoneminder/api/lib/Cake/Model/Datasource/DboSource.php(427): DboSource->_execute('fileExists', Array)
#2 /usr/local/www/zoneminder/api/lib/Cake/Model/Datasource/DboSource.php(664): DboSource->execute('fileExists', Array, Array)
#3 /usr/local/www/zoneminder/api/lib/Cake/Model/Datasource/DboSource.php(607): DboSource->fetchAll('fileExists', Array, Array)
#4 /usr/local/www/zoneminder/api/lib/Cake/Model/Model.php(827): DboSource->query('fileExists', Array, Object(Event))
#5 /usr/local/www/zoneminder/api/app/Controller/EventsController.php(128): Model->__call('fileExists', Array)
#6 /usr/local/www/zoneminder/api/app/Controller/EventsController.php(128): Event->fileExists(Array)
#7 [internal function]: EventsController->view('93')
#8 /usr/local/www/zoneminder/api/lib/Cake/Controller/Controller.php(491): ReflectionMethod->invokeArgs(Object(EventsController), Array)
#9 /usr/local/www/zoneminder/api/app/Plugin/Crud/Lib/CrudControllerTrait.php(31): Controller->invokeAction(Object(CakeRequest))
#10 /usr/local/www/zoneminder/api/lib/Cake/Routing/Dispatcher.php(193): AppController->invokeAction(Object(CakeRequest))
#11 /usr/local/www/zoneminder/api/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(EventsController), Object(CakeRequest))
#12 /usr/local/www/zoneminder/api/app/webroot/index.php(108): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#13 {main}
The text was updated successfully, but these errors were encountered:
If you are referring to this FAQ entry then it is date marked 'as of Apr 2018'.
If you have updated to a version of ZM that is post Apr 2018 then you don't need to replace the file.
Edit 1: Ah I see what you mean. You are running an old version of ZM but EventsController.php has gone though changes that are messing up your system.
Yes, that may be the case.
What is the problem you are trying to solve? The 24hr preview API update required message?
Edit 2: Man I should really read the full message before. Looks like you've solved your problem and have kindly suggested I should point to the Dec 19 commit. Is that correct?
I followed your instructions to update the
EventsController.php
to the latest unreleased version in your FAQ wiki and it started causing the SQL error at the bottom of this message. The issue is that the ZM team added some code on May 7-8, 2018 and it incorrectly queries the db. Maybe change the FAQ post to point to the Dec 19EventsController.php
commit.SQL Error:
The text was updated successfully, but these errors were encountered: