Allow the selection of multiple vocabularies

Created on 30 November 2021, almost 3 years ago
Updated 26 July 2024, 4 months ago

I have a site with multiple vocabularies which I would like to apply Onomasticon features to. It would be great to be able to designate multiple vocabularies as "Glossary" vocabularies.

Remaining Work

  1. Assess the complexity of adding the feature
  2. If technically viable, design an update interface
  3. Implement in code
✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cedewey Denver, CO

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany broon Potsdam

    I finally got to work on this again. It does work as expected, the only drawback is that I can't get the filter settings to be a list of checkboxes for selecting the vocabularies. The "onomasticon_vocabulary" can be an array, but as the vocabulary maschine names are not known in advance, the schema fails upon saving, with something like

    InvalidArgumentException: The configuration property filters.filter_onomasticon.settings.onomasticon_vocabulary.glossary doesn't exist.

    Anybody got an idea on how to fix that? Do I need to write a custom plugin annotation class?

  • πŸ‡ΊπŸ‡ΈUnited States srdtwc Skokie, IL

    Yes I believe that's the same difficulty I was having. I was only able to get this working with a text field.

  • πŸ‡ΊπŸ‡ΈUnited States srdtwc Skokie, IL

    Here is a reroll of MR3 as a patch against the 2.2.1 release for anyone who needs it in the interim

    I've changed the textfield to a textarea to allow for more vocabularies to be listed

  • πŸ‡΅πŸ‡ΉPortugal joao.ramos.costa

    joao.ramos.costa β†’ made their first commit to this issue’s fork.

  • Status changed to Needs review 8 months ago
  • πŸ‡΅πŸ‡ΉPortugal joao.ramos.costa

    Dear,

    here's a updated suggestion (patch from MR14 https://git.drupalcode.org/project/onomasticon/-/merge_requests/14 ) with some fixes from #10 and tackle @broon concerning from #8. Namely:

    - filter schema.
    - Update hook to existing instances to new schema settings.
    - Single hook_onomasticon_terms with all loaded terms.
    - Form checkboxes instead of select for vocabularies.
    - Settings form validation to prevent empty vocabularies or vocabulary set when filter is disabled.

    Cheers!

  • πŸ‡΅πŸ‡ΉPortugal joao.ramos.costa

    Dear @broon, any thoughts on #13 patch ?
    I'd move forward with this, the changes seem pretty straightforward and adding the schema allows use in Drupal 10.3+. By chance when updating I didn't notice because I already had the patch, but the schema is necessary.

    thx :)

Production build 0.71.5 2024