Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2006 at 15:38 UTC
Updated:
26 Dec 2006 at 10:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
webchickHm. I think it makes more sense to fix this in OpenSearch module. It doesn't really make sense for core to require users to initiate HTTP requests for search results, as that's inconsistent with the way everything else is output.
Comment #2
fiLi commentedI agree. This kind of takes the point out of OpenSearch, doesn't it?
Is there a quick fix for that? I'm no PHP coder, but isn't this a one line replace?
Comment #3
hickory commentedI'm not sure what's meant by "require users to initiate HTTP requests for search results" - this fix just changes the links in search results so that they use absolute URLs rather than relative URLs.
I tried to fix it in opensearch.module, but couldn't find anywhere to do so, as it uses the _search hook in node.module to produce the search results.
Comment #4
moshe weitzman commentedI'm not sure where to fix this. But the problem gets worse if run drupal in a subdir. Both the xml:base link and the relative search result links include the subdir so the links simply aren't valid. for an example, see http://www.relayforlife.org/relay/opensearch/node/hope
Comment #5
hickory commentedThis is breaking livesearch as well. Here's an actual patch.
Comment #6
Steven commentedMoshe: The links in that opensearch feed are messed up inside the XML itself... the base url is being prefixed to a url()-generated relative URL. Which piece of code is doing that?
Comment #7
moshe weitzman commented@Steven - sorry, i had some local modifications that i forgot about. i just reverted to latest 4.7 branch.
Now, the links at http://www.relayforlife.org/relay/opensearch/node/hope still don't look right and fail in some RSS readers (Vienna on OSX, bloglines.com). But some work OK (google reader).
Note that xml:base has a suspicious slash at the end which is added by opensearch_feed()
Comment #8
Steven commentedI don't think the xml base is weird... it's the url to
url('', NULL, NULL, TRUE);. I.e. the $base_url. The relative links have a starting slash because they are prefixed with $base_path.However, if some readers and such have problems with relative links, it's indeed better to switch to absolute. We have no idea what happens to the data generated by search_data().
Committed to HEAD and changed the user results too, for consistency.
Comment #9
(not verified) commented