Adding New Directories Error and Data Indexing Issues
| Project: | Search Files |
| Version: | 6.x-2.0-beta2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | thl |
| Status: | closed |
| Issue tags: | Adding Directory Issue, data not importing, Search Files |
Jump to:
I have run the following errors using both the 6.x-2.0-beta2 or the development version. I am not sure what is causing it but I thought I would pass this on.
The error below comes up after I click submit on the add new directories page. Regardless of the error message the information is still submitted to the database. However when i go back to the page with directory listings I have a new error message (see below). Despite these error messages, the module has been able to find and index files BUT it does not record any data in the data field located in the search_data table. The only thing it puts in is the directory location and filename. I am hoping someone can help me figure out what is happening. I have tested the helper addons through terminal and they all seem to be working fine.
Any suggestions would be greatly appreciated. If it helps I am running drupal 6.13 with mysql, apache and leopard server.
Page where the first error occurs
/admin/settings/search_files/directories/add
Error Message after the Submit button is pushed.
array(5) { ["storage"]=> NULL ["submitted"]=> bool(true) ["values"]=> array(6) { ["directory"]=> string(31) "/sites/default/files/documents/" ["op"]=> string(6) "Submit" ["submit"]=> string(6) "Submit" ["form_build_id"]=> string(37) "form-0e072d66a6f418b86237a23e0606f97d" ["form_token"]=> string(32) "f01f3cdb8303e2099d8df8776e3eb00e" ["form_id"]=> string(43) "search_files_directories_directory_add_form" } ["clicked_button"]=> array(18) { ["#type"]=> string(6) "submit" ["#value"]=> string(6) "Submit" ["#post"]=> array(5) { ["directory"]=> string(31) "/sites/default/files/documents/" ["op"]=> string(6) "Submit" ["form_build_id"]=> string(37) "form-d3a256a990e600618ede2d0748a8e7c1" ["form_token"]=> string(32) "f01f3cdb8303e2099d8df8776e3eb00e" ["form_id"]=> string(43) "search_files_directories_directory_add_form" } ["#programmed"]=> bool(false) ["#tree"]=> bool(false) ["#parents"]=> array(1) { [0]=> string(6) "submit" } ["#array_parents"]=> array(1) { [0]=> string(6) "submit" } ["#weight"]=> float(0.002) ["#processed"]=> bool(false) ["#description"]=> NULL ["#attributes"]=> array(0) { } ["#required"]=> bool(false) ["#input"]=> bool(true) ["#name"]=> string(2) "op" ["#button_type"]=> string(6) "submit" ["#executes_submit_callback"]=> bool(true) ["#process"]=> array(1) { [0]=> string(16) "form_expand_ahah" } ["#id"]=> string(11) "edit-submit" } ["redirect"]=> NULL }
Error Messages from Search Directory Files Page
Page Location: /admin/settings/search_files/directories
- warning: mysqli_query() [function.mysqli-query]: Empty query in /Library/WebServer/Documents/WebRoot/Global Vision/globalvision.ca/includes/database.mysqli.inc on line 108.
- user warning: Duplicate entry '/sites/default/files/documents/' for key 2 query: INSERT INTO search_files_directories SET `directory` = '/sites/default/files/documents/'; in /Library/WebServer/Documents/WebRoot/Global Vision/globalvision.ca/sites/all/Modules/search_files/search_files_directories.module on line 338.
- warning: mysqli_query() [function.mysqli-query]: Empty query in /Library/WebServer/Documents/WebRoot/Global Vision/globalvision.ca/includes/database.mysqli.inc on line 108.
Sample of what gets put in the Data Value in the Search Data Table
file name sites default files documents 2007glctemplateagendapdf text

#1
- Adding Directory issue
Dup of #514324: patch for SQL Fixes for postgres, missing function name, fixed forms and a stray var_dump Stray var_dump. Only a cosmetic issue, also looks dangerous.
- Data not importing and SQL errors
Good catch. Some database table names were wrong after an (obviously incomplete) name space cleanup. I didn't notice on my development machine, because it had both old and new tables installed. Recognized later when indexer updated one table but search queried the other, never showing up latest data.
see
search_files_directories.module revision 1.1.2.10
search_files_directories.install revision 1.1.2.8
search_files_directories.module revision 1.1.2.10
Fixed in Beta3
#2
#3