Skip to content

[Admin] Sorting title does not work when content type has another title field #3386

Open
@clem

Description

@clem

Details

Question Answer
Relevant Bolt Version master
Install type Composer install
BC Break no
PHP version 7.4
Web server Built-in

Reproduction

If you're filing a bug, please describe how to reproduce it. Include as much
relevant information as possible, such as:

Bug summary

* When I have a content type with two `title` fields (one at the root level, and another in a `set` field)
* the sorting on the admin listing page is not relevant

Specifics

* I am using Bolt 5.1.18
* It was installed with `composer create-project bolt/project bolt-issues`
* I am using Firefox 108.0.1 
* I have also checked with Safari

Steps to reproduce

* Install a fresh Bolt project
* Update the product content type to add a custom set field with a `title` sub-field:
        my_custom_set:
            type: set
            fields:
                title: 
                    type: text
                    label: 'My custom set title'
                description:
                    type: redactor
                    label: 'My custom set description'
* Go on the products admin and update some products to set `title`s in the custom set field
* Sort by "Title"
* Here's an example of what it looks like:

Bad products title sorting on admin listing

Expected result

* I expect the products to be sorted by their title, and not by the custom set's title

Actual result

* Products are sorted by their titles (main title and custom set's title)

Thanks a lot 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions