When fac fetches the json files it seems it does not take the subdirecory into account in which drupal is installed. This is indicated by the 404 messages I can see printed on the js-console. The URLs in these messages do not contain the subdir.
Additionaly when I run drush -d cron I see lots of
Undefined index: items fac.module:305 [61.63 sec, 45.59 MB] [notice]
Invalid argument supplied for foreach() fac.module:305 [61.63 sec, 45.59 MB] [warning](not sure if it's related though).
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | fac-base_path_fix-2699917-6.patch | 2.28 KB | marty2081 |
Comments
Comment #2
guidot commentedComment #3
guidot commentedI'm not sure if that's the way to go, but removing the leading slash in line 249 in
jquery.fastautocomplete.jssolved the problem here. See attached patch.Comment #5
guidot commentedOk, the patch was against 2.1, maybe it should be against latest dev?
Anyway, there seem to be more places that need attention: When I select a result the URL opened also misses the subdir.
Comment #6
marty2081 commentedWe should use base_path() to determine the proper path for the JSON files. Can you try the attached patch on the dev version to see if this fixes the subfolder issue?
When you select a result, the JS takes the first anchor in the result it can find and opens the href of that anchor. So if the URL you end up at is not correct, that's in the output of the result view mode / field output. That is not something the module generates and you should check your view mode/field output.
Comment #7
marty2081 commentedComment #8
marty2081 commentedPS: the notice is not related, but fixed in the patch as well.
Comment #10
guidot commentedSorry for the delay and thanks Martijn for looking into this.
As you already integrated this patch into current dev I just tried that. I tried two backends, the built-in basic title search service and the search api search service.
Comment #11
firewaller commentedI've gone ahead and created a separate issue/patch here for the following errors:
Notice: Undefined index: items in fac_generate_json_for_key() (line 305 of /sites/all/modules/contrib/fac/fac.module).Warning: Invalid argument supplied for foreach() in fac_generate_json_for_key() (line 305 of /sites/all/modules/contrib/fac/fac.module).