0

Using Drupal 7. All of the people on my site have personal contact forms. When I type their name into the search bar, I get 'no results'.

I need people to be able to find users' personal contact form links by using the search function.

I'm using the core Search module and have enabled 'users' to be included in the search, but no results come up, regardless of which name I use. Site has been re-indexed, caches flushed, etc.

All users have a status of 'authenticated' and permissions have been set on 'contact' and 'search' to allow the results to show.

Any help is appreciated. Thanks.

1 Answer 1

1

Okay. I was under a deadline so I came up with an annoying but functioning solution.

      1) I added the Search by page module (https://www.drupal.org/project/search_by_page) and enabled it.
      2) I made a new search environment by going to admin/config/search/search_by_page.
      3) In the new search environment, I enabled all the content types I wanted the module to pull.
      4) How I got it to pull users' contact pages was:
      5) Go to the enironment I made and clicked 'edit'
      6) On the top right of the page are two tabs: 'General settings' and 'paths'
      7) I clicked on 'paths'and then clicked 'add new path'
      8) I opened a new browser window and navigated to the 'People' tab. I clicked on a user and selected their 'Contact' tab, and copied the path (in my case, user/number/contact
      9) I went back to the 'add new path' tab and pasted that info in the 'page to index' section
      10) I entered a page title (Contact Mr. Smith) and saved. Clicked on 'add new path' for next user.
      11) Repeated steps 7-11 for all 50 users.
      12) Re-indexed site by running cron. Voila, contact pages come up in search results.

This was a cumbersome, time-consuming way of doing this, and I'm sure there's a better solution. However, if you're pressed for time like I was, I hope this helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.