I've installed the last development version of Search Files module, but the same occurs with the last stable version.

When I search something and there are results on the attachments tab the links to the attachments are broken (if I click on them Drupal give me a Page not found error).

The links are like this:
http://www.MyServer.com/drupal/?q=sites/default/files/filename_0.doc

Why are linking there? I think the correct link should be:
http://www.MyServer.com/drupal/sites/default/files/prova_0.doc

Comments

Dimas_’s picture

Fix description:

Why are linking there? I think the correct link should be:
http://www.MyServer.com/drupal/sites/default/files/filename_0.doc

DogsRUs’s picture

We have a very similar problem and I am adding a description here in hopes it helps. The links for node attachments in the search results lead to Page Not Found errors.

For example. from the node itself, the link to the node's attachment is:

https://siteURL/system/files/private/test.doc

But, when the attachment from that same node is found by the Search Files module under the Attachments tab search results, the link becomes:

https://siteURL/sites/default/files/private/test.doc

We do have Private Upload installed, which is why "system" is in the first URL, but we are finding the same pattern with files that are not loaded through the Private Upload module.

Any help would be greatly appreciated.

caprenter’s picture

I don't think I shed a whole load of light onto this, but I've just been working with 6.x-2.0-beta4 for the first time and I had the same problem as described in #1 when I got my first PDF search result.

I did not have Clean Urls enabled (http://drupal.org/node/15365) at first, so I went an enabled them and then the links to the PDF worked just fine.

BTW - I was doing this on a multisite install.

Dimas_’s picture

Yes, with Clean URLs activated the problem is solved. But I don't want to enable this option :(