Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294771

Link fields are not sortable in Views.

$
0
0

Problem/Motivation

Not sure how i could be the first to report this; but unable to to find a post regarding this bug.

The Link field type is not sortable in Views:

table config

This is with 9.2.6. I am sure the same for D8 but have not tested. I tested in D7 and this does work as expected.

Oddly enough there is still the config on the field itself to select which column in the link table to use for sorting:

field config

Also, am i the only one that finds it confusing/inconsistent to have this:

Used by Style: Table to determine the actual column to click sort the field on. The default is usually fine.

when the actual section that determines Table is called Format, not Style. This inconsistency is continued on the first screen shot (Table config) where the title of the modal is "Style options". I don't really have a preference between Format or Style; but i am a huge fan of consistency.

As half of this is already there and it did work in D7; guessing not too hard to fix this - so will spend some time looking at patch.

Steps to reproduce

Proposed resolution

Add a hook_field_views_data_alter to the missing core/modules/link/link.views.inc file to set "click sortable" to TRUE.

Remaining tasks

1. write patch for setting link fields to click sortable [done]
2. test that it works [done]
3. write tests [todo]

User interface changes

This will provide a checkbox in Views table style/format settings to make Link fields sortable.

API changes

None.

Data model changes

None.

Release notes snippet


Viewing all articles
Browse latest Browse all 294771

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>