Skip to content

Unable to unselect a "grouping" or "category" taxonomy #1214

New issue

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

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

Already on GitHub? Sign in to your account

Closed
technicallyerik opened this issue Mar 23, 2020 · 5 comments · Fixed by #1232
Closed

Unable to unselect a "grouping" or "category" taxonomy #1214

technicallyerik opened this issue Mar 23, 2020 · 5 comments · Fixed by #1232
Labels
🐛 tag: bug This is a bug.

Comments

@technicallyerik
Copy link
Contributor

I suppose I don't know if this a feature or a bug, but I am unable to unselect a "grouping" or "category" taxonomy option.

Details

Question Answer
Relevant Bolt Version 4.0.0-rc.7
Install type Composer install
PHP version 7.2.22
Web server Apache
For UX/UI issues Safari 13.0.5

Reproduction

Specifics

I setup my taxonomy as follows:

categories:
    name: Categories
    slug: categories
    singular_name: Category
    singular_slug: category
    behaves_like: categories
    multiple: false
    options: [ Category 1, Category 2, Category 3 ]

series:
    name: Series
    slug: series
    singular_name: Series
    singular_slug: Series
    behaves_like: grouping
    options: [ Series 1, Series 2, Series 3 ]

Expected result

I am able to not select an option when creating an entry using these taxonomy. I would expect the dropdown to default to empty ("Select Option") similar to how tags function.

Actual result

New entries are defaulted to the first taxonomy option, with no option to select none:

Screen Shot 2020-03-22 at 10 24 29 PM

@JTNMW
Copy link
Contributor

JTNMW commented Mar 23, 2020

The field config option in contenttypes.yaml 'allowempty: true' allows the select field to be set to empty.

However, I also would like to have the default set to empty. At the moment all new records have the first taxonomy automatically.

@technicallyerik
Copy link
Contributor Author

technicallyerik commented Mar 23, 2020

@JTNMW - To clarify, I'm not using a select field on my content type. The select fields in my screenshot above are from my taxonomy:
taxonomy: [ categories, tags, series ]

I attempted to add allow_empty: true to my taxonomy definition (after digging around the source a bit and seeing that it's an option: https://github.com/bolt/core/blob/master/src/Configuration/Parser/TaxonomyParser.php) but it didn't appear to have an effect.

@JTNMW
Copy link
Contributor

JTNMW commented Mar 23, 2020

My misunderstanding, sorry.
'Allow_empty:' did previously work with select fields in bolt 3.xx. I presumed it was still working on 4 but on checking it seems not be functioning.

Hopefully the developers will resolve this and the 'empty as default' rasied in this issue.

@bobdenotter
Copy link
Member

Yup, this is buggy! We'll get this fixed. :-)

@bobdenotter
Copy link
Member

Thanks for reporting! This is fixed in #1232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 tag: bug This is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants