Problem/Motivation

Views has a flag for defining that a filter plugin doesn't provide operators. Drupal\views\Plugin\views\filter\BooleanOperator is setting that to true even though the plugin provides operators. This leads to inconsistent markup.

Steps to reproduce

  • Go to /admin/structure/views/nojs/handler/frontpage/page_1/filter/status
  • Find element with .views-left-30
  • The element should be followed by another element that has class views-right-70 class, but in this case it isn't because the no_operator flag has been set

Proposed resolution

Remove the $no_operator = TRUE from Drupal\views\Plugin\views\filter\BooleanOperator.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

lauriii created an issue. See original summary.

lauriii’s picture

Status: Active » Needs review
StatusFileSize
new629 bytes
lauriii’s picture

lauriii’s picture

StatusFileSize
new943 bytes
new1.54 KB

Not sure if it's worthwhile adding test coverage for this but I thought I'd go ahead and add some just to be sure.

The last submitted patch, 4: 3161199-4-test-only.patch, failed testing. View results

bnjmnm’s picture

Status: Needs review » Reviewed & tested by the community

Manually confirmed the fix works and xdebugged through to see what specifically this change does. The followup I was going to request was already added in #3 👌

  • catch committed 761dbfb on 9.1.x
    Issue #3161199 by lauriii, bnjmnm: Remove $no_operator = TRUE from Views...

  • catch committed 3e9838b on 9.0.x
    Issue #3161199 by lauriii, bnjmnm: Remove $no_operator = TRUE from Views...
catch’s picture

Version: 9.1.x-dev » 8.9.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.1.x and cherry-picked back to 8.9.x, thanks!

  • catch committed 8ef98ed on 8.9.x
    Issue #3161199 by lauriii, bnjmnm: Remove $no_operator = TRUE from Views...

Status: Fixed » Closed (fixed)

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