Problem/Motivation

The configuration for 'Facets to include' is represented as a list of strings using the key/value pairs of checkboxes, eg:

facets_to_include:
    'facet_block:information_for': 'facet_block:information_for'
    'facet_block:category': 'facet_block:category'
    'facet_block:type': '0'
    'facet_block:news_type': 0

Proposed resolution

Simplify 'facets_to_include' list for readability by removing empty values and only keep the values, eg:

facets_to_include:
    - 'facet_block:information_for'
    - 'facet_block:category'

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#4 3255453-4.patch4.5 KBidebr
#4 interdiff-2-4.txt1.04 KBidebr
#2 3255453-2.patch3.46 KBidebr

Comments

idebr created an issue. See original summary.

idebr’s picture

Status: Active » Needs review
StatusFileSize
new3.46 KB

Attached patch simplifies 'facets_to_include' list for readability by removing empty values and keeping only the values.

gnikolovski’s picture

Do we need an update hook to convert the config to the new format for existing users?

idebr’s picture

StatusFileSize
new1.04 KB
new4.5 KB

Yes, an update hook for existing block settings is a good idea!

Attached patch adds a post_update hook to simplify the facets_to_include list for existing blocks.

gnikolovski’s picture

Assigned: Unassigned » gnikolovski

  • gnikolovski committed ca6164e on 8.x-1.x authored by idebr
    Issue #3255453 by idebr, gnikolovski: Simplify 'facets_to_include' list...
gnikolovski’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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