The link to the selected suggestion is not a valid URL on my Drupal project. The link used is something like http://example.com375 (no slashed after domain name!), resulting in a 404 when selected or clicked.
In the demo View that comes with search_autocomplete, called "nodes_autocomplete" I have the exact same problem.
The preview output of the "nodes_autocomplete"-View will look like this:
[
{
"link" : "http://example.com375",
"value" : "Profil DP 120",
"fields" : {
"title" : "Profil DP 120",
"name" : "author: Jane Doe"
},
"group" : {
"group_id" : "product",
"group_name" : "product"
}
},Thank you very much for your help!
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | url-trimmed--2477199-8.patch | 2.76 KB | dom. |
Comments
Comment #1
propercroc commentedComment #2
dom. commentedHi !
Links have to be a URL ! So in views, the field you choose for the "link setting" MUST BE a string representing a URL. It you put the NID as a link it won't work. Try using "Content: Link" field for instance. If you can't, you will have to "Rewrite the output of this field" in the view to make the output being a link.
Comment #3
spanac commentedConfirming this problem on clean install. Found a problem in new version of search_autocomplete/views/theme/views_search_autocomplete_style.theme.inc regarding URL extracting. Patch 7.x-4.5 from 2015-04-23 or use an older version of this great module (version 7.x-4.3+2-dev from 2015-03-24 is working without this problem).
Comment #4
spanac commentedComment #5
caspianroach commentedI can confirm that this does happen on a clean installation, just found out about this module, wasn't sure why it wasn't working. I think the /.../ part in the url is being mistaken for an regexp pattern and ends up ignored.
Comment #6
darkdante commentedHi.
I can confirm this problem too, after reverting back to 7.x-4.4 it worked properly again.
Kind Regards
Comment #7
cozzamara commentedThe same for me...
Comment #8
dom. commentedHi all !
Here is a patch that should solve the issue. Can one of you have a try and review it please ?
Thanks
Comment #9
cozzamara commentedThe seems to work for me.
Comment #10
cozzamara commentedThe patch sorry....
Comment #11
dom. commented@cozzamara: thanks !
Anyone else can double confirm so I can create another release using this ?
Comment #12
vivand commentedreverted back to April 20 DEV version which works ok.
Comment #13
dom. commented@vivand : what about this patch ?
Comment #14
renat commentedPatch from #8 works like a charm for me, so, based on previous confirmation of it's validity and keeping in mind that it was proposed by a module's maintainer, marking this issue as RTBC.
Comment #15
migmedia commented@dom.
patch restores the original behavior. It fixes this issue for me.
Thanks
Comment #16
theodorosploumisPatch from #8 did not work for me with 7.x-4.5. I 've installed 7.x-4.x-dev (2015-Apr-20) to fix it.
Notice that I have override the initial Views used for the autocomplete.
Comment #18
dom. commentedHi,
Sorry for delay, I was off for a few days. Patch is commited and available with the 7.x-4.x It will be included in the 7.x-4.6 release.