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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm’s picture

Title: Emphasise need to log in for search » Remove or emphasise need to log in for search
Project: Project issue tracking » Drupal.org customizations
Version: 7.x-2.x-dev » 7.x-3.x-dev
Component: Issues » Code
Status: Needs work » Postponed
Parent issue: » #2136119: Text search on issue queues is slow and sometimes WSODs
Related issues: +#2309867: Issue search fails silently for anonymous users

drupalorg_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.

YesCT’s picture

Status: Postponed » Active

un postponing since those issues are done.

cjoy’s picture

Issue summary: View changes
othermachines’s picture

Regarding the placeholder text, just wanted to pipe in that "Login" is a noun whereas "Log in" is a verb (and the better choice here).

Michael-IDA’s picture

+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!

Neelanjana Das’s picture

FileSize
462 bytes

The search would be open for anonymous user with this patch.

Neelanjana Das’s picture

Assigned: Unassigned » Neelanjana Das
Status: Active » Needs review
drumm’s picture

Status: Needs review » Needs work

This patch doesn't apply:

drumm@Neils-MacBook-Pro:~/drupal/git/drupalorg$ curl -s https://www.drupal.org/files/issues/patch_407.txt | git apply
error: drupalorg_project1.module: No such file or directory

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.

Neelanjana Das’s picture

FileSize
1.25 KB

This is the new patch for drupalorg_project module with changes made accordingly.

Neelanjana Das’s picture

Status: Needs work » Active
Neelanjana Das’s picture

Assigned: Neelanjana Das » Unassigned
Neelanjana Das’s picture

FileSize
1.48 KB

sorry, could not edit or delete the previous patch here, so i uploaded a new one. i hope this patch works.

Neelanjana Das’s picture

Status: Active » Needs review
Neelanjana Das’s picture

Neelanjana Das’s picture

Assigned: Unassigned » Neelanjana Das
prateek_drupal’s picture

FileSize
15.4 KB

There 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:

Image

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

  • drumm committed 5a4df79 on 2394175-anonymous-search authored by Neelanjana Das
    Issue #2394175 by Neelanjana Das, drumm: Remove the need to log in for...
drumm’s picture

Status: Needs review » Fixed
Issue tags: +needs drupal.org deployment

Looks okay. I did find a bit more code that could be removed.

unset($form['#info']['filter-search_api_views_fulltext']['label']);

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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

drumm’s picture

Issue tags: -needs drupal.org deployment

This has been deployed to Drupal.org.