Problem/Motivation

We have added a sort criteria to TMGMT Job overview, but tests keep failing with "views.view.tmgmt_job_overview:display.default.display_options.sorts.changed.expose.order missing schema".

Proposed resolution

#1 Set the type for views.sort_expose.date to be "views.sort_expose.standard" to inherit the mapping with the order.
OR
#8 Remove the expose.order from views.sort_expose.standard schema and don't set that in SortPluginBase::defaultExposeOptions().

Remaining tasks

User interface changes

API changes

Comments

sasanikolic’s picture

StatusFileSize
new522 bytes
arla’s picture

Status: Active » Needs review
arla’s picture

Issue tags: +Needs tests

This happens when the sort is exposed, and the field plugin is date.

Let's see if there's a related Views test where we can add an exposed date sort.

sasanikolic’s picture

StatusFileSize
new1.25 KB

I've tried adding date sorting to a test view with and without the previous patch applied.
If the patch is not applied, we get schema missing errors, if it is, we get the following (in the test review).

Status: Needs review » Needs work

The last submitted patch, 4: date_sort_expose-2503663-4.patch, failed testing.

The last submitted patch, 4: date_sort_expose-2503663-4.patch, failed testing.

arla’s picture

Assigned: sasanikolic » Unassigned

Seems like that test view is very outdated. I edited it in the Views UI, and when I saved it, a lot was changed (mostly new stuff added). Seems like the last patch is failing because the few lines added trigger some validation of this outdated structure.

olli’s picture

Issue tags: +VDC, +Configuration schema
StatusFileSize
new1.11 KB

Do we even need that display_options.sorts.changed.expose.order so you could replace

          expose:
            label: 'Date Created'
            order: ASC

with

          expose:
            label: 'Date Created'
          order: ASC

?

olli’s picture

Status: Needs work » Needs review
olli’s picture

Issue tags: -Needs tests
StatusFileSize
new2.16 KB
new3.27 KB

Here's a test.

olli’s picture

Issue summary: View changes

Added the alternative to "Proposed resolution".

The last submitted patch, 10: 2503663-10-test.patch, failed testing.

juanse254 queued 10: 2503663-10.patch for re-testing.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

@olli++

The actual sort order is exposed in core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php:243 so its a different place.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 646fc6c and pushed to 8.0.x. Thanks!

  • alexpott committed 646fc6c on 8.0.x
    Issue #2503663 by olli, sasanikolic: Date sort_expose handler is missing...

Status: Fixed » Closed (fixed)

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