Hi,

I have Open Atrium installed in a sub-directory atrium2, rather than in the root directory / of my web-server. When I try and search for a keyword such as "blah" I get a 404 error since Atrium tries to access the URL /search/node/blah . If I manually change the url to /atrium2/search/node/blah then search works.

I am using Clean Urls. I have already edited .htaccess and added "RewriteBase /atrium2".

Is there another setting somewhere that needs to be modified...?

Thanks,

J

Comments

j_cimb_barker’s picture

I have also updated $base_url in settings.php.

mpotter’s picture

Confirmed the problem. I'll need to look into this. Last time I installed locally with a subdirectory I thought Search worked fine. We actually get the search functionality from Panopoly and don't do anything unusual with it in OA, so not sure without more investigation what might be wrong.

j_cimb_barker’s picture

I have found this issue in the Panopoly Issue tracker : https://drupal.org/node/2050491 . It seems similar...?

j_cimb_barker’s picture

Further analysis shows that the issue only occurs when using https rather than http. When I search my Atrium2 using http search works correctly. If use https then I have the problem.

j_cimb_barker’s picture

I have fixed the issue for me by changing the following in profiles/openatrium/modules/contrib/oa_core/modules/oa_search/js/oa_search.js :

var path = '/search' + '/' + (type === 'users' ? 'user' : 'node') + '/' + term;

to

var path = 'search' + '/' + (type === 'users' ? 'user' : 'node') + '/' + term;

Not sure if this is considered the way to go... :)

mpotter’s picture

Status: Active » Fixed

Yep, that's the correct fix. Committed to 0b39b4c of oa_core.

lukio’s picture

Hi,

That fix is still wrong. The real fix should be:

var path =  Drupal.settings.basePath +  'search' + '/' + (type === 'users' ? 'user' : 'node') + '/' + term;

Cheers!

lukio’s picture

Status: Fixed » Needs review
cgove’s picture

The fix works for me, thanks.

pjbarry21’s picture

#7 worked for me.

I'm using OA 2.12 and #5 was what was in that release (at least in my file). Updated that line to #7 and the search works (was seeing the issue that's in the child ticket: https://drupal.org/node/2152257).

mpotter’s picture

Status: Needs review » Fixed

Confirmed #7 here. Committed to 6d11a68 in oa_core.

Status: Fixed » Closed (fixed)

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

dijup tuladhar’s picture

I have update my version to OA 2.13 but still I am facing issue with the update. When i try to search using the user option for the top toolbar.

I get Fatal error: Call to undefined method SearchApiViewsQuery::add_field() in \profiles\openatrium\modules\contrib\views\plugins\views_plugin_row.inc on line 116

I have used the virtual hosting and my app is installed in the root path.

dijup tuladhar’s picture

Status: Closed (fixed) » Active
dijup tuladhar’s picture

Version: 7.x-2.09 » 7.x-2.13
mpotter’s picture

You probably need to revert the oa_search feature after you updated. There are instructions here https://drupal.org/node/2169701 on how to properly apply an update. Be sure you are running the update script and reverting features. Otherwise you won't get the new user index or views for user searching.

Also, since this is a different error than the original post, you should really have created a NEW issue rather than re-opening this old issue.

cgove’s picture

I was getting: Fatal error: Call to a member function range() on a non-object in .../profiles/openatrium/modules/contrib/search_api/contrib/search_api_views/includes/query.inc on line 246

Turns out the issue was my user index was disabled.

mpotter’s picture

Status: Active » Closed (fixed)

OK, this issue has gotten confused. Please open a new issue if you still have trouble with the steps needed to reproduce it in the latest version.