drupalorg_search is throwing a fatal error because it is calling deprecated apachesolr functions (get_fields, remove_field, add_field). I have replaced those elements with the new "filter" version of each.

Likewise - and maybe this is just because I'm trying to do this locally - facet.field is not set by default, therefore I get a foreach warning on the foreach over face.field. I protected against this with a simple is_array check. This may not be necessary for the production environment, but it seemed like good practice here anyhow.

Comments

rfay’s picture

We can go ahead and get a start on this by putting this into the modules sandbox on all 10 staging sites. I'll see if I can do that later today. We won't put it into the redesign branch until it's gotten committed into CVS.

damien tournoud’s picture

+  if (is_array($params['facet.field'])) {

This one should probably be a isset(). Hiding the error in case facet.field is not an array falls into the "don't babysit broken code" rule.

Otherwise, this looks great. I can commit once this is tested on the staging site.

rfay’s picture

Note that when we tried to deploy this patch on staging9 we got many (random) errors as mentioned on #666590: Staging9: Fatal Error: Cannot redeclare (various).

Turning off APC got rid of the erors.

Amazon’s picture

We are trying to debug this APC problem.

The site is made up of three directories. https://svn.drupal.org/drupal/drupal.org/redesign/, https://svn.drupal.org/drupal/redesign_modules_sandbox/staging9/, https://svn.drupal.org/drupal/themes/sandbox/

We confirmed that the /staging9 is running "At revision 2216"

Rfay checked out the code locally and uses APC without incident.

calebgilbert’s picture

Fyi, the APC issue has been fixed, but the fatal errors will still exist on all the staging sites except staging9 since only staging9 has the patched drupalorg/search modules on it at the moment.

Amazon’s picture

I've enabled the meta-type filter blocks on staging9. Initial testing seems to indicate they work.

http://staging9.drupal.org/search/apachesolr_search/test

We are trying to implement: https://infrastructure.drupal.org/drupal.org-style-guide/prototype/searc...

The correct settings can be set here: http://staging9.drupal.org/admin/settings/apachesolr/enabled-filters

csevb10’s picture

StatusFileSize
new1.39 KB

isset instead of is_array

damien tournoud’s picture

Status: Needs review » Fixed

Committed to HEAD.

csevb10’s picture

Status: Fixed » Needs review
StatusFileSize
new2.01 KB

A patch for the meta_types search to correct additional deprecated functions.

damien tournoud’s picture

Status: Needs review » Needs work

Committed. The fatal error is fixed, but the facet doesn't work as intended: you cannot unselect an item when selected.

damien tournoud’s picture

Status: Needs work » Fixed

Committed http://drupal.org/cvs?commit=308310

That fixes the behavior of the facet, and closes this issue.

rfay’s picture

I rolled this out on the staging sites today (in the redesign branch).

Any drupalorg modules that were in the modules sandbox were deleted in favor of this one.

jwilson3’s picture

doh! this may have inadvertently deleted various peoples work by deleting stuff from staging module sandboxes.

Please do take care with that.

Luckily i do still have a local copy of my stuff, and I hadn't committed anything of utter importance yet.

PS. I'm under the impression now from DamZ and Caleb G that if i need to do work on drupalorg module, i get it direct from cvs head, and put it in redesign_module_sandbox/stagingX/patched/ and its up to me to keep it in sync. This is kinda non-optimal solution since we supposedly already have svn-cvs syncing in place. I filed an issue on this exact problem here: #679264: improve repository syncing, streamline workflows for development with svn

rfay’s picture

jrguitar21, your work is still in svn. You shouldn't have any trouble getting it. You can create a patch from it and submit to cvs.

Status: Fixed » Closed (fixed)

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

  • Commit 069806e on 6.x-3.x, 7.x-3.x-dev by Damien Tournoud:
    #665976 follow-up by Damien Tournoud: fix the behavior of the meta-type...
  • Commit 0b53aa5 on 6.x-3.x, 7.x-3.x-dev by Damien Tournoud:
    #665976 by csevb10: update drupalorg_search to the new Apache solr API,...
  • Commit 28fc84b on 6.x-3.x, 7.x-3.x-dev by Damien Tournoud:
    #665976 followup by csevb10: fix fatal error in search.