Problem/Motivation

The plugin summary is inaccurate and can be confusing.

Steps to reproduce

Install the asset_injector module, and save a simple configuration without any conditions.
The summary will be inaccurate:
Inaccurate condition summary

Proposed resolution

The summary needs to be more accurate:

It should be empty when not in use.
It should produce a list of views which it is acting upon if it is configured to do do.

Remaining tasks

Provide a patch for it.

Issue fork context-3202261

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

codebymikey created an issue. See original summary.

DeaOm made their first commit to this issue’s fork.

deaom’s picture

Status: Active » Needs review

The viewinclusion condition now displays a no views pages were selected on empty condition and a message with listed selected views pages when at least one is selected.
The return true for the following pages message comes from cores RequestPath, just mentioning it here, so there is no confusion.

paulocs’s picture

Makes sense.

paulocs’s picture

  • paulocs committed 4dc3049 on 8.x-4.x authored by DeaOm
    Issue #3202261 by DeaOm, codebymikey: ViewInclusion condition plugin...
paulocs’s picture

Status: Needs review » Fixed

codebymikey’s picture

Status: Fixed » Needs review

Pushed an update in MR 9 to all the condition plugins so that they match their ::defaultConfiguration() definitions when not configured.

Otherwise they're not removed from ConditionPluginCollection::getConfiguration().

This happened particularly because the negate option was always set to null rather than the default value of false.

And also the reason the following:

Return true on the following pages:

(as well as "Select views pages") were showing up despite not being "configured".

The custom RequestPathExclusion plugin extends core's RequestPath, but was hiding the "negate" checkbox.

  • paulocs committed 8c9b7a8 on 8.x-4.x authored by codebymikey
    Issue #3202261 by codebymikey, DeaOm, paulocs: ViewInclusion condition...
paulocs’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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