Hello,
When I use presets to set up a new monitor, after choosing camera, I have this error message Unknown column 'DefaultView' in 'field list'
May be someone could help me ?
Pascal
error with presets
Monitor Presets Fix
I did some checking on your error and found out that my ZoneMinder does it as well. So, why not fix it? Here's the fix:
Why does this work? The select statement in the changed line above asked for a DefaultView column from the MonitorPresets table. There is no DefaultView column in that table, so, just don't ask for it.
ZM, was this just a bit of legacy code or something important?
I tested this fix on my copy and works 100%.
Code: Select all
$new_x10_monitor = isset($x10_monitor)?$x10_monitor:array();
}
if ( !empty($preset) )
{
- $result = mysql_query( "select Type, Device, Channel, Format, Host, Port, Path, Width, Height, Palette, MaxFPS, Controllable, ControlId, ControlDevice, ControlAddress, DefaultRate, DefaultScale from MonitorPresets where Id = '$preset'" );
+ $result = mysql_query( "select Type, Device, Channel, Format, Host, Port, Path, Width, Height, Palette, MaxFPS, Controllable, ControlId, ControlDevice, ControlAddress, " /*DefaultView,*/ . "DefaultRate, DefaultScale from MonitorPresets where Id = '$preset'" );
if ( !$result )
die( mysql_error() );
$preset = mysql_fetch_assoc( $result );
mysql_free_result( $result );
ZM, was this just a bit of legacy code or something important?
I tested this fix on my copy and works 100%.
I've tried to patch 1.22.3 with monitor presets patch found in wiki.
Patch applied on file zm_html_view_monitor.php in /usr/local/zcr/ZoneMinder-1.22.3 (/web)
Error still the same.
Do I need to compile again or not.
Excuse if my question seems stupid but I have still some gap with linux architecture
Thanks
Patch applied on file zm_html_view_monitor.php in /usr/local/zcr/ZoneMinder-1.22.3 (/web)
Error still the same.
Do I need to compile again or not.
Excuse if my question seems stupid but I have still some gap with linux architecture
Thanks
One of two things, either your apache is using a location other than /web for its files, or the patch was not successful. Check your /web dir for a patch reject file, or just open the zm_html_view_monitor.php and use my first posting to verify the line was modified properly. (the - is the old line and + is the new line). If it was applied properly, and apache does use /web for its web files, try closing the webpage and trying again.breizhbug wrote:I've tried to patch 1.22.3 with monitor presets patch found in wiki.
Patch applied on file zm_html_view_monitor.php in /usr/local/zcr/ZoneMinder-1.22.3 (/web)
Error still the same.
No need ot recompile. We are not changing any source code, just PHP scripts.breizhbug wrote: Do I need to compile again or not.
Excuse if my question seems stupid but I have still some gap with linux architecture
Thanks