event export doesn't work
event export doesn't work
If I click on Export I got a white page, and firebug say:
6 <link rel="shortcut icon" href="graphics/favicon.ico"/>
7 <link rel="stylesheet" href="css/reset.css" type="text/css"/>
8 <link rel="stylesheet" href="skins/classic/css/skin.css" type="text/css" media="screen"/>
9 <link rel="stylesheet" href="skins/classic/views/css/export.css" type="text/css" media="screen"/>
10 <script type="text/javascript" src="tools/mootools/mootools.js"></script>
11 <script type="text/javascript" src="js/mootools.ext.js"></script>
12 <script type="text/javascript">
13 var AJAX_TIMEOUT = 50000;
14
15 var currentView = 'export';
16 var thisUrl = "https://192.168.55.2/zm/index.php";
17 var skinPath = "skins/classic";
18
19 var canEditSystem = true;
20 var canViewSystem = true;
21
22 var refreshParent = false;
23
24 var focusWindow = true;
25 </script>
26 <script type="text/javascript">
27<br />
28<b>Parse error</b>: syntax error, unexpected T_FOREACH in <b>/srv/www/zoneminder/skins/classic/views/js/export.js.php</b> on line <b>5</b><br />
6 <link rel="shortcut icon" href="graphics/favicon.ico"/>
7 <link rel="stylesheet" href="css/reset.css" type="text/css"/>
8 <link rel="stylesheet" href="skins/classic/css/skin.css" type="text/css" media="screen"/>
9 <link rel="stylesheet" href="skins/classic/views/css/export.css" type="text/css" media="screen"/>
10 <script type="text/javascript" src="tools/mootools/mootools.js"></script>
11 <script type="text/javascript" src="js/mootools.ext.js"></script>
12 <script type="text/javascript">
13 var AJAX_TIMEOUT = 50000;
14
15 var currentView = 'export';
16 var thisUrl = "https://192.168.55.2/zm/index.php";
17 var skinPath = "skins/classic";
18
19 var canEditSystem = true;
20 var canViewSystem = true;
21
22 var refreshParent = false;
23
24 var focusWindow = true;
25 </script>
26 <script type="text/javascript">
27<br />
28<b>Parse error</b>: syntax error, unexpected T_FOREACH in <b>/srv/www/zoneminder/skins/classic/views/js/export.js.php</b> on line <b>5</b><br />
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
event export issues
Hi - first post .. ZM 1.24.1 just blows me away!
However, have experienced 3 issues and fixed two (Vista, IE7, ZM 1.24.1)
js/mootools.js: innerHTML not supported in IE7 - no fix; this.fireEvent naffed too... impacts zone editing.
fixed several items to export events (excuse php 4 programming):
ajax/event.php: mods:
if ( (isset($_REQUEST['id']) && empty($_REQUEST['id'])) || (isset($_REQUEST['eids']) && empty($_REQUEST['eids'])))
{
ajaxError( "No event id(s) supplied" );
}
.
.
.
if ( $exportFile = exportEvents( $_REQUEST['eids'],$exportDetail, $exportFrames, $exportImages, $exportVideo, $ex
portMisc, $exportFormat ) )
------------------
skins/classic/views/js/export.js:
skins/classic/views/js/video.js:
change
parms += '&'+form.toQueryString();
to
parms += '&'+$(form).toQueryString();
Mootools issues with IE7 real bummer, guess I'll have to edit zones on IE 6
However, have experienced 3 issues and fixed two (Vista, IE7, ZM 1.24.1)
js/mootools.js: innerHTML not supported in IE7 - no fix; this.fireEvent naffed too... impacts zone editing.
fixed several items to export events (excuse php 4 programming):
ajax/event.php: mods:
if ( (isset($_REQUEST['id']) && empty($_REQUEST['id'])) || (isset($_REQUEST['eids']) && empty($_REQUEST['eids'])))
{
ajaxError( "No event id(s) supplied" );
}
.
.
.
if ( $exportFile = exportEvents( $_REQUEST['eids'],$exportDetail, $exportFrames, $exportImages, $exportVideo, $ex
portMisc, $exportFormat ) )
------------------
skins/classic/views/js/export.js:
skins/classic/views/js/video.js:
change
parms += '&'+form.toQueryString();
to
parms += '&'+$(form).toQueryString();
Mootools issues with IE7 real bummer, guess I'll have to edit zones on IE 6
missed one change
skins/classic/includes/export_functions.php
in exportEvents:
if ( is_array( $eids ) )
{
foreach ( $eids as $eid )
{
$exportFileList = array_merge( $exportFileList, exportFileList( $eid,
$exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc ) );
}
}
in exportEvents:
if ( is_array( $eids ) )
{
foreach ( $eids as $eid )
{
$exportFileList = array_merge( $exportFileList, exportFileList( $eid,
$exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc ) );
}
}
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Thanks for taking the time to come back with such a useful post including fixes. I have implemented them (or similar) here and they should be on SVN later.
I hadn't noticed the IE7 mootools issues so will have a bit of a dig around at that to see if there are any workarounds that might work. Alternatively ZM is using mootols v 1.11 and I have been looking for an excuse to migrate it up to v1.21 so this might be that excuse, especially if it fixes the issues.
I hadn't noticed the IE7 mootools issues so will have a bit of a dig around at that to see if there are any workarounds that might work. Alternatively ZM is using mootols v 1.11 and I have been looking for an excuse to migrate it up to v1.21 so this might be that excuse, especially if it fixes the issues.
Phil
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Updates?
Hi - thanks for the updates.
Would you be able to forward the offical updates... I seem to have missed something - export fails when clicked from filter window, but works from the Event Viewer window [ IE 6 sp3 browser ]
I should test on IE 8 now too.
Would you be able to forward the offical updates... I seem to have missed something - export fails when clicked from filter window, but works from the Event Viewer window [ IE 6 sp3 browser ]
I should test on IE 8 now too.
Re: Updates?
Using version 1.24.2 and not able to export from the filter window. Is there a patch that can be downloaded to solve this problem?mcg wrote:I seem to have missed something - export fails when clicked from filter window, but works from the Event Viewer window
Please advise.
By the way, 1.24.2 is awesome.
P.V.Anthony
Re: Updates?
Following the post on this thread and made some changes on the code and it works. The export works.pvanthony wrote: Using version 1.24.2 and not able to export from the filter window. Is there a patch that can be downloaded to solve this problem?
Here is the patch for 1.24.2.
------------ start -------------------------
# diff -ruN ./ajax/event.php.org ./ajax/event.php
--- ./ajax/event.php.org 2009-07-29 01:13:50.073354656 +0800
+++ ./ajax/event.php 2009-07-29 01:16:48.713354123 +0800
@@ -1,6 +1,6 @@
<?php
-if ( empty($_REQUEST['id']) && empty($_REQUEST['eids']) )
+if ((isset($_REQUEST['id']) && empty($_REQUEST['id'])) || (isset($_REQUEST['eids']) && empty($_REQUEST['eids'])) )
{
ajaxError( "No event id(s) supplied" );
}
--------------- end -----------------------
--------------- start ----------------------
diff -ruN ./skins/classic/includes/export_functions.php.org ./skins/classic/includes/export_functions.php
--- ./skins/classic/includes/export_functions.php.org 2009-07-29 01:26:17.430355432 +0800
+++ ./skins/classic/includes/export_functions.php 2009-07-29 01:28:05.624354257 +0800
@@ -252,7 +252,7 @@
{
foreach ( $eids as $eid )
{
- $exportFileList = array_merge( $exportFileList, exportFileList( $eid ), $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc );
+ $exportFileList = array_merge( $exportFileList, exportFileList( $eid, $exportDetail, $exportFrames, $exportImages, $exportVideo, $exportMisc ));
}
}
else
----------------end -----------------------
Hope this is useful to others.
P.V.Anthony
-
- Posts: 1
- Joined: Fri Jul 02, 2010 5:39 pm
How to patch
I've never patched a file before. I tried creating a file call 'event.diff' with the code between start and end in my zoneminder directory. Then, I ran 'patch event.diff' as root and it just sits there until I escape out.
Help! Anyone!
Thanks,
Alex
Help! Anyone!
Thanks,
Alex
-
- Posts: 15
- Joined: Wed Feb 17, 2010 1:57 am
Would the above patch help my problem?
http://www.zoneminder.com/forums/viewtopic.php?t=16110
and if so, I also have to ask the same question as estranged...
http://www.zoneminder.com/forums/viewtopic.php?t=16110
and if so, I also have to ask the same question as estranged...
O.K, I've read up on how to patch, and I've downloaded patch (seemed a good idea at the time).
I've gone to what I hope is the correct directory, but didn't get very far (line 6 to be exact)
brafferton@cameras:~$ cd /usr/share/zoneminder/ajax
brafferton@cameras:/usr/share/zoneminder/ajax$ patch event.php event.diff
patching file event.php
patch: **** malformed patch at line 6: <?php
brafferton@cameras:/usr/share/zoneminder/ajax$
And is it going to help my specific problem - as per previous post?
I've gone to what I hope is the correct directory, but didn't get very far (line 6 to be exact)
brafferton@cameras:~$ cd /usr/share/zoneminder/ajax
brafferton@cameras:/usr/share/zoneminder/ajax$ patch event.php event.diff
patching file event.php
patch: **** malformed patch at line 6: <?php
brafferton@cameras:/usr/share/zoneminder/ajax$
And is it going to help my specific problem - as per previous post?