The backport of this module didn't add a `hook_block()` wrapper to the more specific block hooks provided by core in 7.x.

Comments

jhedstrom’s picture

Status: Active » Needs review
StatusFileSize
new686 bytes

Attached patch adds this hook.

pwolanin’s picture

Looks reasonable - let me test locally.

cpliakas’s picture

Status: Needs review » Needs work

This patch definitely works as intended, however the Current Search blocks do not :-(. Therefore I am marking as needs work for that reason since we do have to fix the underlying issues prior to committing the fix, otherwise people will get fatal errors.

Specifically, the error I am getting is Call to a member function fetchField() on a non-object in sites/all/modules/contrib/facetapi/contrib/current_search/current_search.block.inc on line 45

Anyways, thanks for the contribution and flushing out this use case!
Chris

jhedstrom’s picture

I probably won't have a chance to take this the rest of the way, but my findings were that the ctools plugin hooks aren't fully implemented (eg, key classes are not found and loaded as intended).

n.dhuygelaere’s picture

StatusFileSize
new94.95 KB

If it can help, i have make some changes in facetapi and current_search for make it work on Drupal 6.19 with postgres database and solr (module 6.3.x).

If you can test.

zerolab’s picture

StatusFileSize
new13.37 KB

Attaching a patch with correct ctools plugin hooks, hook_block() implementation and proper D6 form elements for the settings form.

Needs some additional testing. More eyes are better than two.

Best,
Dan

zerolab’s picture

Status: Needs work » Needs review
voidberg’s picture

The patch in #6 was a good start but it did not work for me: tokens were not being replaced, did not show up on admin forms, lots of warnings regarding arrays sent instead of strings etc. I am attaching a modified version with the following changes:
- Added token as a dependency to current_search.
- Backported token code to token 6.
- Replaced default token definitions to be token 6 compatible.
- Removed Drupal 7 function calls.
- Changed class attributes to strings instead of arrays as drupal_attributes does not work with arrays in Drupal 6.

We're using this in production with no issues so far.

cpliakas’s picture

Status: Needs review » Reviewed & tested by the community

I haven;t tested the patch, but given the state of the existing code it is way better than where we are at now so I am in favor of committing it even if it isn't perfect (which it very well could be :-)).

Thanks for the contribution,
Chris

DaPooch’s picture

Patch #8 is working for me (sort of) but I had to add an include to the /contrib/current_search/plugins/current_search/item_text.inc file before the class declaration since I was getting an error that "Class 'CurrentSearchItem' not found in item_text.inc on line 11"

require_once('item.inc')

voidberg’s picture

Status: Reviewed & tested by the community » Fixed
cpliakas’s picture

Great work. Thanks!

rares’s picture

upgrading from 6.x-3.0-beta2 to -dev also fixed this for me. As far as I'm concerned, the -beta2 is unusable without these fixes, as the admin pages are not displaying properly (no item settings, no advanced settings, no save configuration button)

Status: Fixed » Closed (fixed)

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