Community Support for OpenDocMan (Deprecated)
Error when viewing a category - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Bug Reports (https://forum.opendocman.com/forum-8.html)
+--- Thread: Error when viewing a category (/thread-617.html)



Error when viewing a category - vladi550821 - 05-15-2013

In 1.2.6.5 when using db prefix different from odm, an attempt to view certain category produces error ".. odm_data table missing ..". The reason is a bug in line 229 in category.php which requires 'odm_data' instead of {$GLOBALS['CONFIG']['db_prefix']}data. The bug is fixed by replacing the

WRONG LINE 229
$query = "SELECT id, realname FROM 'odm_data' WHERE category = '$category_id'";

with

CORRECT LINE 229
$query = "SELECT id, realname FROM {$GLOBALS['CONFIG']['db_prefix']}data WHERE category = '$category_id'";


Re: Error when viewing a category - Stephen - 05-15-2013

Issue created:

<!-- m --><a class="postlink" href="https://github.com/opendocman/opendocman/issues/95">https://github.com/opendocman/opendocman/issues/95</a><!-- m -->