Hide unpublished/disabled terms

Created on 14 December 2023, about 1 year ago

Adding a functionality to allow hiding unpublished/disabled taxonomy terms from menus would be great.

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇹🇷Turkey makbay

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

Merge Requests

Comments & Activities

  • Issue created by @makbay
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    4 pass
  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 1 year ago
    4 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update 12 months ago
    4 pass
  • 🇬🇷Greece emberhood

    Attaching a patch adding respect of parent enable check of term link.

    This is considered needed in case of conflict with work done in other places like this one: https://www.drupal.org/files/issues/2023-10-13/taxonomy_menu-hide_empty_...

  • 🇮🇳India Sandeep_k New Delhi

    Hi, I've Tested MR- MR !9 mergeable on Drupal version- 10.1.9-dev. The MR was applied successfully and looks good to me.

    Testing Steps:

    • Set up Drupal 10.1.9.
    • Download/Enable the Taxonomy Menu module.
    • Create Taxonomy Menu> Create new terms> Published & unpublished. You can see unpublished terms are also showing in the menu, Added before results
    • Download the shared patch & apply.
    • Go back to the site home & Reverify the menu.

    Testing Results:
    After applying the patch, the Unpublished terms are not showing now.

  • 🇹🇼Taiwan g-brodiei

    Hi, we've met the same issue on a use case to render a taxonomy menu by linkset feature.

    We're using Drupal 10.2.5, taxonomy_menu 3.6

    The test in merge request does not update the menu item shown in linkset endpoint, please see the gif below where I'd unpublished the term.

    Steps with old patch:

    1. Unpublished term
    2. Refresh to check menu item disabled, yes
    3. Refresh endpoint of linkset menu to have menu item disappear, still exists

    I've figured out another fix that successfully updates the menu item's "enabled" property while also affects linkset endpoint.

    Steps with new patch:

    1. Unpublished term
    2. Refresh to check menu item disabled, yes
    3. Refresh endpoint of linkset menu to have menu item disappear, the unpublished menu item disappears as well
  • Status changed to Needs work 20 days ago
  • 🇺🇸United States DamienMcKenna NH, USA

    We definitely want to get this in the next release.

    Can someone please update the MR to include the latest changes in the 8.x-3.x branch?

    Also, this needs test coverage to make sure the change isn't accidentally broken later on.

    Thank you.

Production build 0.71.5 2024