Closed (duplicate)
Project:
Drupal core
Version:
x.y.z
Component:
profile.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 Jun 2004 at 21:59 UTC
Updated:
25 Jul 2005 at 06:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
TDobes commented+1... excellent idea
Comment #2
dries commentedFirst, this patch is a bit hack-ish in that it operates on the profile module's internal structures.
Secondly, it does not respect the profile fields' 'private'-setting.
Comment #3
killes@www.drop.org commentedThe use of profile module's internal structure is perfectly valid as this is where the sought values are to be found.
The privacy setting in its current form is pretty useless anyway:
http://drupal.org/node/view/9798
The proper solution would be to put the privacy setting into the profile module's db structure maybe using the new access patch (if possible). It would be relatively easy to make a setting visible on a per role basis for example. Unfortunatelxy I don't have time for it.
Comment #4
walkah commentedi think this is very important since end users don't understand why profile information doesn't create search hits.
i also agree that making use of profile internals is acceptable here since profile data is really an extension of user info.
attached is an updated patch (against HEAD) that a) repsects private fields and b) ensures distinct results.
Comment #5
moshe weitzman commented+1 for the functionality. -1 for the implementation.
Any module can add profile data via hook_user(), not just profile.module. So to be consistent, I propose a new operation in hook_user() where modules return search results.
Orofile.module will then use this hook to append matching users as needed. This will fix the problem where user.module acts upon data maintained in profile.module. Its OK that profile table is accessed during a search. Its not OK that user.module is doing the accessing. Just my .02.
Comment #6
walkah commentedgood point, however, with the 4.5 freeze on and rumblings of search.module overhauls for 4.6, this is a quick fix that catches the main case, i.e. profile.module -- which is part of core.
i'd say this patch is still worth it for 4.5... but i guess it's in Dries' hands ;)
Comment #7
Bèr Kessels commented+1 from me.
I think, that this might sound like a "quick hack". I would rather call it a "temporary solution". Indeed we would need a general approach, but thats the case in much more places in Drupal. Untill someone rewrites big parts to create such a "general apporach" the best solution acc. to me, is a solution that at least fixes thing so it does what users expect: return profile info.
Ber
Comment #8
moshe weitzman commentedmy goal for searchable profiles would be for fielded search. htat is a criiteria builder where you could select 'male' and 'single', for example. the criteria builder ui is dynamic depending on the active profile fields.
Comment #9
(not verified) commentedSorry to barge in - would any of you esteemed Drupal folk care to help mentor me through implementation of a field level profile search? - I need one for a client.
I've only just started looking at Drupal API's etc. so it feels like a challenge, but that's how to get to know a system like this is it not?.... your the team in the know, if you can spare a moment, and perhaps a guiding light or two, here are my initial (sketched) thoughts:
http://drupal.org/node/12568
Thankyou.
Comment #10
(not verified) commentedps. My phase two (as described in above mentioned node) is to provide the dynamic aspect so eloquently described by Weitzman.
Comment #11
killes@www.drop.org commentedThe issue is very important, but unfortunately the patch does not apply anymore.
Comment #12
Steven commentedI'm not convinced of the use of a user-specific search hook. Really, it would be quite complicated, and profile.module is already the swiss army knife of user data.
We could just move the user search directly into profile.module. The only downside to that is that you need profile.module just to search users. This is IMO an acceptable compromise, as the current search is just a stupid wildcard match on the username. I.e. it doesn't help you find people, it helps you find usernames.
About indexing: we could use the text indexing for users as well, but I'm not sure it would be very useful. There wouldn't be much scaling benefits as every user's profile is typically short and to the point, not like a piece of text.
Comment #13
dublin drupaller commentedwould the following woprkaround be acceptable?
1 An extra checkbox underneath the serach box that says something like "user profile information".
2 an extra option on the SEARCH settings page that allows admin the ability to switch on/off the extra checkbox.
I was looking for such a patch earlier (to search profiles) and noticed the discussion sorta died.
The latest patch linked above worked first time for me (drupal 4.5) for anyone else looking for a solution.
I notice that the search does take a little bit longer than normal though..after installing the patch which is understandable. So perhaps the above idea (make search user profiles information optional) might rekindle the discussion/patch.
Dub
Comment #14
Steven commented-1 on the checkbox. Like Google, we try to give the user the best possible search without fuss. E.g. when nothing is found, search automatically adds wildcards to the query and tries again.
Comment #15
killes@www.drop.org commentedSo, do we agree that we want to move user-search to profiles? Or not? Dries?
Comment #16
RobRoy commentedWhat's going on with this? I'm using this quickfix, but definitely think this should be included in users or profiles module. I actually wanted users to be able to find other members according to what exact options they chose in their profiles. Like when you click on a link in a user's profile, it shows other users who match that option, but I want people to be able to search all users on all options (find other users who like movies, or books, or whatever) and have it be a little more interactive then just a search box. Has anyone started that or should I?
If anyone needs this quick fix for 4.6, I think you just replace this in users.module
with this
Comment #17
moshe weitzman commentedrbarreca. you should work on this. many have promised to deliver this but never did.
Comment #18
joerique commentedHi folks,
I've tried the above code, it sure searches inside profiles, but with a strange side effect - it no longer allows the users to edit their own settings (with the exception of admin). Please advise on how to avoid this.
TIA,
Joe.
Comment #19
kevinc-1 commentedI have the same issue. When I use the code above I get the same issue. The profile fields are searchable, but it is not possible to change any of the fields - a blank page results when I try to save.
Please help!
Kevin D. Clarke
email: kdc01@rogers.com
surf: http://www.theengine.com/
surf: http://www.GayInRealLife.com/
Comment #20
kevinc-1 commentedCorrection. The field valuse ARE saved, but I still get the blank page. Your assistance is apprieciated.
Comment #21
kbahey commentedHere is a more recent issue with a patch http://drupal.org/node/32382