Forums | Mahara Community
Search Users not working
25 November 2014, 10:15
Our site is running 1.9testing (I am not sure why - I thought that I had pulled the release version via git but apparently must have pulled down the dev version instead ...) But anyway it is up to date, and our "Search Users" functionality is not working, and never has worked. It's a bit of an impediment for our users to find content, needless to say!
Under Site Options / Search Settings the Search Plugin is "internal" and there do not appear to be any other options. I turned on "Search Usernames" under User settings and that works - I can search for a user by username. But I can't seem to search for a user with their actual name, even if I type it in with correct case and completely with an exact match.
Is there anything else I should look for to enable search users to work properly?
25 November 2014, 11:25
When we are preparing for a new release, the branch is called 1.9.4testing for example and becomes 1.9.4 once the release is out. IF you pulled the latest code from git then you already have all the bug fixes that will go into the 1.9.4 release.
As for your user search, do you have "Exact search" turned on in the plugin administration (see http://manual.mahara.org/en/1.9/administration/extensions.html#search-internal-search )? If so, please turn it off and see if you can search for a user's name. Just try with the first name.
If that doesn't work, do you have any errors in your error log when you try searching for a user?
26 November 2014, 3:05
Under Admin / Extensions / Plugin Type: search / Configuration,
Exact User searches [ ] is not checked and hasn't been. That's what's strange - exact or inexact searches seem to work. But now that I have turned on the search usernames, it does find substrings of usernames just fine. It won't find names, though, or parts of them, and if the search usernames feature is turned off, the search users never returns anything at all.
Any ideas? Thanks for your help!
And about the git - I'll make a separate post about that since it's a different topic - or do some more research.
26 November 2014, 9:42
One other thing to check: Are all your users in one institution or across multiple institution on your Mahara instance? If a site admin searches, they find users from across the site. However, if a regular user searches, they only see results from their own institution per default.
02 December 2014, 6:11
All the users are in one institution. And admin can't find them with search, either. We create users automatically once they log in and authenticate with the LDAP plugin. But since we can search by part of the username, it makes no sense that the full name search wouldn't work either.
And thanks Aaron for the tip about git.
04 December 2014, 21:54
Mhh. That is proving tricky and not seeing your setup does not make it easier. A few more things for you to check:
- Do your users use display names? You can see that easily when you go to Administration -> Users -> Select all your users (well, up to 500 at one time) -> Get reports -> You will see the column "Display name". If your users entered a name in there then that is going to mess with the user search.
- Do you have the option "Users can hide real name" enabled in Administration -> Configure site -> Site options -> User settings? Do you have the same problem on your testing site? If you do, turn it off and search for a user. Alternatively, you can check in your database in the table usr_account_preference and search for all instances of "hiderealname" in the "field" column.
That's pretty much all I can think of. If you want to give it a try on another instance, you can set up accounts on http://demo.mahara.org and replicate the settings that the users have for whom you cannot search and see if you find them there. If you don't, then we'd need to have the exact details of the admin settings that you made, and the usernames, real names and display names and also their settings on their account page pertaining to name and username. Please note that the demo site doesn't have exact search turned on.
05 December 2014, 5:02
Hi Thanks again Kristina!
Some of our users do have a display name, but most don't. They must have set that up themselves. But if I type "Mike" in the search when logged in as admin, I get no results. If I type "mlandis" I do get myself as a result though since I turned on search by usernames also. (Prior, I wasn't getting anything even for mlandis without that on).
I turned off the option "users can hide real name" - it was on. That didn't seem to make a difference, but I'd prefer that off anyway.
I'll explore it some more - I'll have to set up a test site replica and do some debugging on the code I think and maybe I can track it down. I gather this is not a common problem! But it is an important one. Users can't connect with each other if they can't find their coworkers and fellow students to add as friends, after all.
Thanks so much for your help and ideas - if I find a bug in my code debugging, I'll be sure and figure out the channel through which to submit it.
08 December 2014, 9:13
Good luck with the debugging. If you do find a bug that is in core Mahara, you can report it at https://bugs.launchpad.net/mahara/+filebug
I'm out of ideas for the moment so hopefully you can find something on your testing site. I'd recommend to set up a fresh Mahara without any customizations and load a few users with their current settings and see how it works and then add your customizations. But a developer might have a more efficient approach.
26 November 2014, 13:31
The head commit in our "*_STABLE" branches always has "testing" on the end (eg 1.9.4testing), except for the commit that marks a particular release. That's because it's essentially a "Nightly build" which carries slightly more risk than a release commit.
For production sites I recommend going with the latest release instead of the head commit. We tag the releases in git to make it easy to check them out, e.g. "1.9.4_RELEASE" will be the tag for 1.9.4.
See also https://wiki.mahara.org/index.php/Developer_Area/Version_Numbering_Policy#Stable_branch for an exhaustive description of the process. ;)