I made an attempt to upgrade this module for d6. I updated the .info file, ran coder, fixed all the coding issues found (mostly concatenation operator whitespace issues), then made almost all the D5- D6 changes. The only one I didn't do was the hook_theme theme registry changes because I couldn't understand all the changes required. If I can understand how to do this I'll go back and add it. Modules enabled fine, but I haven't had a chance to test them yet with the actual apache solr installed. But I wanted to get this posted asap to avoid duplicate work.

Comments

WorldFallz’s picture

StatusFileSize
new19.93 KB

here's an updated patch file with the the required hook_theme implementation. Coder comes up clean and module installs with no problems.

zarin’s picture

hm, i have an error with this patch (using drupal 6.1)

url: .../search/apachesolr_search/test (content is indexed and world "test" is in the index)

error: Fatal error: Unsupported operand types in ...\includes\common.inc on line 1265

robertdouglass’s picture

@WorldFallz: thanks. I'll take a look.

robertdouglass’s picture

Title: intial try at a D6 patch » Upgrade ApacheSolr to D6
drunken monkey’s picture

I created a new DRUPAL-6--1 branch and committed WorldFallz' patch to it.
Please file consecutive patches against that version.

robertdouglass’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

Upon enabling the apachesolr.module:

notice: Undefined index: #action in /Users/robert/Sites/d6soc/sites/all/modules/apachesolr/apachesolr.module on line 530.
notice: Undefined index: #action in /Users/robert/Sites/d6soc/sites/all/modules/apachesolr/apachesolr.module on line 531.
notice: Undefined index: #action in /Users/robert/Sites/d6soc/sites/all/modules/apachesolr/apachesolr.module on line 532.

Upon searching:
Fatal error: Unsupported operand types in /Users/robert/Sites/d6soc/includes/common.inc on line 1265

and

notice: Undefined index: solrsort in /Users/robert/Sites/d6soc/sites/all/modules/apachesolr/apachesolr_search.module on line 45.
notice: Undefined index: page in /Users/robert/Sites/d6soc/sites/all/modules/apachesolr/apachesolr_search.module on line 54.
robertdouglass’s picture

Category: support » bug
robertdouglass’s picture

Status: Needs work » Active
drunken monkey’s picture

Status: Active » Needs review

I committed a new version of the two .module files where the mentioned bugs should be fixed. I just couldn't reproduce the last two notices locally, so I don't know if they still occur.

Please see, whether you come against any errors or unsuspected behaviour. Tests still need to be written and/or updated, which will probably be done some time later this week.

puregin’s picture

StatusFileSize
new3.73 KB

Installed and tested - the latest version (June 2, 2008) now fixes earlier issues with the configuration screens... works as expected, except that the sort block does not appear.

This seems to be because the theme functions are not registered. I've added these to apachesolr_theme().

I've also reorganized the code for the search block so that it goes into the switch statement along with the other block generation code.

drunken monkey’s picture

Thanks for the help, puregin, I didn't check that.
On my system your patch works fine, if noone reports problems I'll commit it later.

drunken monkey’s picture

Newest version now available, including puregin's patch (thanks, again) and some additional tests (now > 50).

drunken monkey’s picture

Status: Needs review » Fixed

Seems like there are no problems anymore (or at least not directly with the port), so setting this to "fixed".

Anonymous’s picture

Status: Fixed » Closed (fixed)

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