Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
clem opened this issue Jan 10, 2023 · 0 comments
Open

Comments

@clem
Copy link
Contributor

clem commented Jan 10, 2023

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 🙏

evertalbers added a commit to evertalbers/bolt-docs that referenced this issue Mar 26, 2024
Suggesting to have unique fieldnames in collections in the examples in the docs, related to bolt/core#3386

There may be more instances in the docs where this can apply.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant