Drupal 10 Compatability

Created on 29 August 2023, about 1 year ago
Updated 7 April 2024, 8 months ago

Problem/Motivation

This module is still valuable, but it is currently only offered in a 7.x version? I currently have it working as a custom module on Drupal 10.

Steps to reproduce

Proposed resolution

Updates need to be made from this patch:

https://www.drupal.org/files/issues/2021-02-08/2609938-27.patch

and then the following change to the views_distinct.info.yml :

core_version_requirement: ^8.8 || ^9 || ^10

and then a new 9.x-10.x version can be offered.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs review

Version

1.1

Component

Code

Created by

🇺🇸United States rsnyd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @rsnyd
  • 🇹🇭Thailand Nick Hope

    Adding the thread that the patch came from 🌱 Port Views Distinct module to Drupal 8 Needs review as a related issue.

    It may be better to close this as a duplicate and rename the thread over there to "Port Views Distinct module to Drupal 8+" or similar.

  • Assigned to chetan 11
  • @chetan-11 opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇹🇷Turkey orkut murat yılmaz Istanbul

    Thanks for the patch:)

    @jay.dansand, can you create a dev branch for this one? It would be easier for us to test it.

    Best,
    Orkut

  • Status changed to Needs work about 1 year ago
  • 🇹🇷Turkey orkut murat yılmaz Istanbul

    @chetan 11, thanks for your contribution.

    When I installed your version on Drupal 10.1.6 site. Right after it, I've started receiving this error:

    Error: Call to undefined function db_select() in _views_distinct_field_settings_get() (line 360 of /var/www/html/web/modules/views_distinct/views_distinct.module).

    I'm changing the issue's status as Needs work.

    Also, it is better to change the content of info file like below:

    name: 'Views Distinct'
    type: module
    description: 'Allow filtering/aggregating "distinct" Views result rows based on arbitrary fields.'
    package: Views
    core_version_requirement: ^8.8 || ^9 || ^10
    dependencies:
      - drupal:views
    

    Best,
    Orkut

  • Merge request !2D10 Compatibility Update → (Open) created by orkut murat yılmaz
  • Status changed to Needs review about 1 year ago
  • 🇹🇷Turkey orkut murat yılmaz Istanbul

    I've done the changes and committed to this issue's branch, also created a new MR too. Right now the error message changed into:

    Cannot use view object to get third party settings.

    Can someone check it too?

  • 🇳🇱Netherlands Summit

    Hi,

    May be to do with; https://www.drupal.org/project/drupal/issues/2686145 🐛 Formatter third party settings missing from Views UI Needs work ?
    greetings,

  • First commit to issue fork.
  • 🇧🇪Belgium davidiio

    After changing the OR for a AND operator in my previous commit I was able to use the module without the log
    Cannot use view object to get third party settings.

    For a basic configuration the module successfully removed duplicates from view.

    1. Create a few articles
    2. Add a reference field for articles in Basic Page.
    3. Create a few basic pages referencing multiple articles.
    4. Create a view of Basic pages
    5. Add a relationship to article
    6. Note that some basic pages titles are duplicated
    7. In the title field config in "Views Distinct settings" tick "Filter this field"
    8. Note that duplicated title are removed from the view

  • 🇨🇦Canada liquidcms

    Core will never replace what this module does. This module (in D7) has the ability to combine fields and use those for uniqueness. Core will never do that.

  • 🇹🇷Turkey orkut murat yılmaz Istanbul

    I strongly agree with @liquidcms, this module has a different purpose.

  • 🇺🇸United States emb03

    +1 for a speedy resolution. I need this module for D10. thx

Production build 0.71.5 2024