Problem/Motivation
Currently it is not clear that the user has to log in in order to access the text input field on the issue search page.
While the input field is disabled and appears grey in some browsers (e.g. Firefox, in other browsers it is rendered very much indifferent from usable input fields (e.g. Webkit).
Proposed resolution
a) Allow anonymous user searches
-or-
b) Add placeholder="Login to search" attribute to input tag.
This will benefit users of all browsers, as it also clarifies _why_ the input is disabled.
Remaining tasks
- make a decision about allowing anonymous user searches
a) if the current login restriction is to be removed:
- find and remove the form alter in the drupalorg_project module
b) if the current login restriction is to remain:
- decide on placeholder text.
- locate form element in module and add placeholder attribute.
Comment | File | Size | Author |
---|---|---|---|
#16 | BVd7w.png | 15.4 KB | prateek_drupal |
#12 | anonymous-search-12.patch | 1.48 KB | Neelanjana Das |
anon_issue_search_webkit_fix.png | 33.14 KB | cjoy | |
anon_issue_search_webkit_current.png | 52.08 KB | cjoy |
Comments
Comment #1
drummdrupalorg_project module does the altering to require logging in. We actually might be able to remove the requirement now that we have faster DB servers. I would still like to wait until #2136119: Text search on issue queues is slow and sometimes WSODs and #2135385: Regression: the pager no longer lets me jump to pages, nor shows total number of pages are fully resolved.
Comment #2
YesCT CreditAttribution: YesCT commentedun postponing since those issues are done.
Comment #3
cjoy CreditAttribution: cjoy commentedComment #4
othermachines CreditAttribution: othermachines commentedRegarding the placeholder text, just wanted to pipe in that "Login" is a noun whereas "Log in" is a verb (and the better choice here).
Comment #5
Michael-IDA CreditAttribution: Michael-IDA commented+1 a) Allow anonymous user searches
This seems exceedingly detrimental to the entire Drupal user base as: A) It is an inconvenience for those with accounts who only need a quick look up, and B) A complete denial of site functionality to those Drupal users (e.g. most) who do not have Drupal.org accounts.
Please return the search functionality back to how it was prior to whatever decision/update disabled it.
Thanks!
Comment #6
Neelanjana Das CreditAttribution: Neelanjana Das at Melity commentedThe search would be open for anonymous user with this patch.
Comment #7
Neelanjana Das CreditAttribution: Neelanjana Das at Melity commentedComment #8
drummThis patch doesn't apply:
See https://www.drupal.org/patch.
There is also some code in
drupalorg_project_form_views_exposed_form_alter()
that will need to be removed.Comment #9
Neelanjana Das CreditAttribution: Neelanjana Das at Melity commentedThis is the new patch for drupalorg_project module with changes made accordingly.
Comment #10
Neelanjana Das CreditAttribution: Neelanjana Das at Melity commentedComment #11
Neelanjana Das CreditAttribution: Neelanjana Das at Melity commentedComment #12
Neelanjana Das CreditAttribution: Neelanjana Das at Melity commentedsorry, could not edit or delete the previous patch here, so i uploaded a new one. i hope this patch works.
Comment #13
Neelanjana Das CreditAttribution: Neelanjana Das at Melity commentedComment #14
Neelanjana Das CreditAttribution: Neelanjana Das at Melity commentedComment #15
Neelanjana Das CreditAttribution: Neelanjana Das at Melity commentedComment #16
prateek_drupalThere is one permission need to set at admin/people/permissions. Under Search give 'Use search ' permission for anonymous user.
And then you can create a search block with below settings
My search block visibility settings:
LAST STEP
Go to
Home » Administration » Configuration » Development » Performance
"Cache pages for anonymous users"
just hit "Clear all cache" & your good to go!
or else in your own module you can use
hook_enable() {
$permissions = array('search permission');
user_role_change_permissions('DRUPAL_ANONYMOUS_USER',$permissions);
}
Hope this helps contact me for any clarifications.
Thanks,
Prateek
Comment #18
drummLooks okay. I did find a bit more code that could be removed.
Was removing the default field label, which we now want to keep.
We’ll merge & deploy this to Drupal.org sometime during the work week since it does have performance implications and we want to monitor how it does in production.
Comment #20
drummThis has been deployed to Drupal.org.