On the 'Configure facet display' page, the settings for sort order of facets - ie: Facet active, Display value, Indexed value etc - are not saved upon submit.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tecjam’s picture

I rolled back to 7.x-1.0-rc2 and the previous settings I had were loaded and the factes were once again displayed in the correct order.

So it seems that the values were still in the database, but they aren't loaded into the edit form / the edit form doesn't submit the values and the facets aren't ordered according to the settings in the database.

cpliakas’s picture

Thanks for posting. I am suspecting that this is a regression introduced by #1451110: Cache facet settings at the adapter level. I will investigate and post back.

Thanks,
Chris

cpliakas’s picture

The bug is definitely confirmed, but it looks like it is limited to the sort form which is confusing to me. I can't seem to track down what caused the issue, although reverting to rc2 does seem to fix it. I will continue to hack away at this, although it would be great to get some help.

~Chris

cpliakas’s picture

I can confirm that this regression was introduced im commit 5f9ffe1.

cpliakas’s picture

Getting more specific, looks like the problem happens starting on line 583 in plugins/facetapi/adapter.inc. Seems like the logic changed so the defaults are applied even if settings already exist.

cpliakas’s picture

Status: Active » Needs review
FileSize
1.56 KB

I understand what is gong on. The change in logic didn't account for that block of code applying the defaults, so the defaults are being applied whether the settings have been saved or not. The attached patch only applies the defaults if the settings have not yet been saved to avoid overriding what was configured by the site administrator.

cpliakas’s picture

This effects dependency plugins as well. Revised patch adds that fix.

cpliakas’s picture

Title: Facet display settings do not save » Logic error when loading settings that prevents sort and dependency options from being saved
Status: Needs review » Fixed

Since this is a crit, marking as fixed and rolling out a hotfix rc4 release.

Committed to all active branches of Facet API

Status: Fixed » Closed (fixed)

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