![]() |
1.2.6.X mimetype and Filter By bugs - 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: 1.2.6.X mimetype and Filter By bugs (/thread-602.html) |
1.2.6.X mimetype and Filter By bugs - Guest - 03-14-2013 Howdy, I have been monkeying with 1.2.6.X versions, and I found 2 bugs which I basically monkey-patched to keep the natives happy: The mimetype problem seems to be highly irritated by the fact that when using Firefox to upload a DOCX file, the $file_mime variable returned from Code: File::mime($_FILES['file']['tmp_name'][$count]) The second problem our users have noticed is that the "Filter By" JS on the Home page (out.php) doesn't work for added UDF fields. I added some debug comments in both functions.php and search.php in order to compare the query strings being sent to search.php from each of these... It turns out that from search.php, the query string will look like this: Code: keyword=French&where=Language&submit=Search& But from the Filter By JS on the Home page, it will look like this: Code: submit=submit&sort_by=id&where=Language_only&sort_order=asc&keyword=French&exact_phrase=on Note that here, WHERE = "Language_only", not "Language". It appears that for UDFs, the "_only" must be stripped, but for built-in fields, it's necessary. Thus, the Filter By version will not work with UDFs, since that will execute udf_functions_search() in udf_functions.php, with the following query: Code: $query = "SELECT table_name,field_type FROM {$GLOBALS['CONFIG']['db_prefix']}udf WHERE display_name = \"" . $dn . "\""; But $dn will be "Language_only", and not "Language" as it should be. Thus, the query returns 0 results when using Filter By with UDFs on the Home page, but doing the same search from the Search page works fine. Note that "Language" is our custom field in this case. Anyway, I basically inserted some little hacks to work around this stuff, because maybe I'm the only experiencing these errors. But if not, hopefully that will help out a bit if they actually are bugs! Re: 1.2.6.X mimetype and Filter By bugs - Stephen - 03-14-2013 Hi Scotty, Re: Mimetypes. Are you using the 1.2.6.5 release or something earlier? Re: 1.2.6.X mimetype and Filter By bugs - Guest - 03-14-2013 Stephen Wrote:Hi Scotty, 1.2.6.4 currently. I haven't upgraded to 1.2.6.5 yet. Re: 1.2.6.X mimetype and Filter By bugs - MarcWard - 06-17-2013 Stephen Wrote:Hi Scotty, Has there been any update to this? The ability to upload zip files is crucial to me. Re: 1.2.6.X mimetype and Filter By bugs - salmanismail - 07-09-2013 Hello Admin, I am experiencing the same 'Filter By' problem as already mentioned by Scottie. I am using version v1.2.6.6. When i add some custom fields and try to search through home page 'Filter By' options, the system show some warnings+notices with no search results. Notice: Undefined offset: 0 in C:\xampp\htdocs\edms\udf_functions.php on line 641 Notice: Undefined offset: 0 in C:\xampp\htdocs\edms\udf_functions.php on line 642 Notice: Undefined offset: 0 in C:\xampp\htdocs\edms\udf_functions.php on line 643 Notice: Undefined offset: 0 in C:\xampp\htdocs\edms\udf_functions.php on line 643 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\edms\search.php on line 184 No Files Found Please let me if this bug is fixed. Thanks Re: 1.2.6.X mimetype and Filter By bugs - salmanismail - 07-09-2013 Hi Scottie, Can you please guide me what hacks you used to overcome the 'Filter By' problem at Home Page. I am experiencing the same problem with version 1.2.6.6. Thanks |