If the $base_url is already contained in the link, there is no need to prepend it.

CommentFileSizeAuthor
#1 patch.patch647 bytesjpmckinney

Comments

jpmckinney’s picture

StatusFileSize
new647 bytes
avpaderno’s picture

Status: Needs review » Fixed

This has been already fixed when changing the code as reported in #605378: Opensearch feed does not validate.

Thanks for reporting the issue, and the patch.

jpmckinney’s picture

Status: Fixed » Needs review

This bug is not fixed by #605378: Opensearch feed does not validate.

The patch (that I wrote) that was applied to dev from #605378: Opensearch feed does not validate prevented the prepending of $base_url to the $guid, which is a new variable I used in that patch.

This patch has to do with preventing the prepending of $base_url to $results[$index]['link'], in a different part of the code. This patch must also be applied.

dave reid’s picture

Have we tried filiing an issue against the Apache Solr module to make it return absolute URLs like the standard set by core search module (they use url($link, array('absolute' => TRUE)))? That seems like the more appropriate option to take instead of fixing it here.

avpaderno’s picture

I agree; it seems more logic. If a module is a replacement for a Drupal core module, then it should behave as the Drupal core module does, in order to avoid problems with third-party modules.

dave reid’s picture

Status: Needs review » Needs work

Yeah, having to handle relative URLs seems very out of place. I've filed a patch for the Apache Solr module at #667650: Results of apachesolr_process_response should return absolute URLs. If it gets fixed we should remove code that adds to the results URLs.

dave reid’s picture

Status: Needs work » Postponed

Postponed is probably the better status right now.

dave reid’s picture

Status: Postponed » Fixed

Both D5 and D6 stable releases of Apache Solr have the fix now, so I removed the workaround from CVS.
http://drupal.org/cvs?commit=323370

Status: Fixed » Closed (fixed)

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