Download & Extend

Error: user warning: Table 'drupal1.search_attachments' doesn't exist query

Project:Search attachments
Version:5.x-3.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi,

I've installed the Search Attachments module and enabled it, but I've got the following error:

In: Home › Administer › Site configuration
In the LIST option

user warning: Table 'drupal1.search_attachments' doesn't exist query: SELECT * FROM search_attachments in /var/www/html/drupal1/includes/database.mysql.inc on line 172.

Thanks in advance for help.

Best Regards,
Martinho

Comments

#1

What version did you install?

#2

from readme.txt

search_attachments.module (Version 5.x-3)

#3

#4

I disabled now, the module and remove it completely from the disk.
I've now downloaded and installed the version you recommend, and the problem still happens.

user warning: Table 'drupal1.search_attachments' doesn't exist query: SELECT * FROM search_attachments in /var/www/html/drupal1/includes/database.mysql.inc on line 172.

#5

Would you mind doing a show tables on your database and sending it to me using my contact form? Off to lunch now then meetings in the afternoon so you might not hear from me until this evening...

#6

It is working now.

I don't know what was happening i did uninstall completely, a load it again, and it works.

But there's something weird. It is now correctly configured, with the helpers configured and tested (pdf and txt).

I did re-index all the site, i also run the cron.php, but when i do searches to keywords in my pdf's it doesn't find anything.

I also checked the drupal logs to see if there is some error, but nothing.

How can i confirm, that module is indexing fine?

Thanks, once again for your support.

#7

Glad to hear you're making some progress.

To confirm that your PDF helper is working, first go into the helper edit page and make sure that you're getting the expected text out of your sample file (the text should be on a green background, pink/red means an error). From what you said above it sounds like your PDF helper is testing OK.

If the helper is extracting text from the sample file, you can look directly in your search_index table (provided you have access to your database). If you do, issue the following SQL:

select * from search_index where type like "file%";

If any of the 'word' fields are blank, then the PDF helper is having a problem with some files. If you have a large search index, try this SQL:

select * from search_index where word = '';

The new version of the module, available at http://interoperating.info/mark/files/search_attachments_5_x_4-dev-2008-02-24.tar.gz, has a logging feature that you can turn on to troubleshoot helpers. I know you had trouble getting the current version working, but you might want to consider upgrading. The new version is still in beta, however.

Let me know the results of the SQL tests.

#8

The helper is working fine, since it detects a pdf file a reads it.
As you can see:

Helper testing:
The PDF helper is tested each time this form is viewed.
The PDF helper has extracted the following text from files/webfm/webfm/Jornais/oje_22-02-2008.pdf (the first file found in the files d irectory with the extension .pdf):

Note:
The sample below shows the first 500 characters and last 500 characters of files/webfm/webfm/Jornais/oje_22-02-2008.pdf. Everything in the middle has been replaced by "[...]" to keep the display of this page brief. The entire file will be indexed.

PUB GOURMET Os segredos do Pão w w w.o j e . pt P10 Número 386 • Sexta-feira, 22 de Fevereiro de 2008 O JORNAL ECONÓMICO Preço: 1cênt. • Director: Álvaro de Mendonça Mota-Engil pré-qualificada na Hungria ▲ ▲ Microsoft abre software Pág. 2 AUTO-ESTRADAS O CONSÓRCIO que integra o grupo português Mota-Engil foi pré-qualificado para a construção e exploração da terceira fase da auto-estrada M6, na Hungria.

But theres something weird, with the result of the query... returns empty:

mysql> select * from search_index where type like "file%";
Empty set (0.00 sec)

#9

Can you run the second SQL, select * from search_index where word = '';, and let me know if the sids match any of the node ids that the files are attached to?

Another thing we should do is manually run the PDF helper application (is it pdftotext?) on some of the files that are not being indexed. I'd be curious to see what the output is, if any. Some PDFs, especially ones that are created by scanning printed documents, do not contain any text. Running pdftotext manually on the files that are not being indexed in your case might show that pdftotext is not pulling out any text. Using the SQL query above, or based on your knowledge of the PDFs on your server, can you run the helper on them on the command line and let me know what you see?

Sorry this is taking so long to troubleshoot, but at this point we need to be sure that your PDFs are OK. In fact, if you don't mind sharing a couple of samples with me, I can test them myself. If you want to send me some, contact me via my Drupal contact form and I can email you.

#10

The pdf's that i am using, are few at this moment (i am in test phase).
But i know the pdftotext command, i can assure you that is correctly configured and it works manually. I can easily output to text in the linux shell.
The pdf's are not encrypted or security protected.

Example:
[root@apolo webfm]# pdftotext baskills.pdf baskills.txt

[root@apolo webfm]# cat baskills.txt | more
Cisco IOS Basic Skills
Understanding how to use Cisco IOS software will save you time when you are configuring your router. If you need a refresher, take a few minutes to read this
chapter. If you are already familiar with Cisco IOS software, go to Chapter 3, Basic Router Configuration,Advanced Router Configuration

mysql> select * from search_index where word = '';
Empty set (0.01 sec)

The rest of the nodes are being indexed fine by the drupal indexing engine, since i have lots of information in the search_index table.

#11

I have to say I'm a bit baffled, if pdftotext does in fact work on the the files that are not being indexed. Can you confirm this one more time (the last time I will ask, but it is an important variable in our troubleshooting 8^). The reason I want to exclude the possibility that pdftotext is not actually extracting the text from the files that are not being indexed is that playing around with pdftotext on my own server, I have been able to replicate failure on some PDF files that should work file. Here is an example of the output in these cases:

[mjordan@lib-pkp files]$ pdftotext ./HIR.pdf -

[mjordan@lib-pkp files]$

In other words, pdftotext is not extracting the text from these files (and is not giving any error messages either). Therefore, text from these files is not showing up in the drupal search index. Running pdftotext on other files on the command line produces the expected output. I'm trying to figure out why pdftotext is not working on this particular file, which, as you said of yours, is not encrypted or locked in any way.

#12

As you suggested, i did the test and it works fine on the command line.

[root@apolo webfm]# pdftotext baskills.pdf - | more
APPENDIX

Cisco IOS Basic Skills
Understanding how to use Cisco IOS software will save you time when you are configuring your router. If you need a refresher, take a few minutes to read this
chapter. If you are already familiar with Cisco IOS software, go to Chapter 3, Basic Router Configuration,Advanced Router Configuration.

I don't know what i can do more, i can install the latest version on your website, if you recommend. If ti has a better logging mechanism maybe we can find what is the problem.

I'm going to to that right now, i will give you reply of the results in the new version.

#13

I've installed the latest version (5.x-4), and thinks are getting better.
It indexes fine, as you can see:

mysql> select count(*) from search_index where type like "file%";
+----------+
| count(*) |
+----------+
| 6594 |
+----------+
1 row in set (0.00 sec)

But when i do a search, it happens two things:
1) An error:

# user warning: Unknown column 'n.nid' in 'field list' query: SELECT DISTINCT(n.nid) FROM node LEFT JOIN i18n_node i18n ON n.nid = i18n.nid WHERE (i18n.language ='en' OR i18n.language ='' OR i18n.language IS NULL) in /var/www/html/drupal1/includes/database.mysql.inc on line 172.
# user warning: Unknown column 'fname' in 'field list' query: SELECT fname, fsize FROM webfm_file WHERE fid = 3 in /var/www/html/drupal1/includes/database.mysql.inc on line 172.

2) It shows the text that matches with the search, but does not present the name of the file.

In attachment to this message, i send a print screen.

AttachmentSize
search_att_error.JPG 50.13 KB

#14

I'm glad that the newer version is working better for you. I've already added some features to make troubleshooting easier, i.e., there is a report indicating how many files out of the total registered by the module have been indexed, you can now choose which file to use as the helper test file, and you can determine the number of characters of text to log for each helper. These features will be in the next release of 5.x-4-dev, probably in a couple of days.

Re. #1 above, what i18n modules do you have installed?

Re. #2, the module is also not showing the size or correct date. I am seeing evidence of similar problems on my own server's copy of the module, and I'm trying to track down the problem. Thanks for the screenshot.

#15

#1 - I have the following i18n modules enabled:
Internationalization 5.x-2.2
i18n - blocks 5.x-2.2
i18n - profile 5.x-2.2
i18n - content types 5.x-2.2

#2 - I have the webfm 5.x-2.8 installed
I don't know if there is something different with the name of the fields in the 'webfm_file' table.

#16

Thanks. I'll try to test search_attachments with these modules installed and configured, to see if I can replicate the error.

As an update, I am adding some checks in the module to log non-readable files and empty extracted text. The new version, which will make it easier to troubleshoot the types of error you are reporting, should be available by Monday.

#17

Hello,
I'm new, and this is because the project is closed.
content_aggregator' doesn't exist query: SELECT * FROM content_aggregator WHERE checked + refresh
Something New to solve this I've Drupal 6.15
http://www.womens-t.com
Thank you
Mario

nobody click here