backdrop-contrib / taxonomy_menu

Adds links to taxonomy terms into a menu.
GNU General Public License v2.0
0 stars 3 forks source link

Term hierarchy is ignored when building taxonomy_menu links #13

Closed argiepiano closed 2 weeks ago

argiepiano commented 2 months ago

To reproduce:

  1. Start with a clean installation of Backdrop
  2. PATCH taxonomy menu with this pr: https://github.com/backdrop-contrib/taxonomy_menu/pull/12
  3. Enable taxonomy_menu
  4. Do not (yet) enable taxonomy menu for any of the site's vocabularies
  5. Add a bunch of terms to the Tags vocabulary in the term UI. Do not assign terms to nodes. Be sure that there is some hierarchy of terms
  6. Now, head to the configuration page for the Tags vocabulary
  7. Enable taxonomy menu for the main menu
  8. Be sure that "Add all menu items to the same level rather than retaining term hierarchy." is unchecked
  9. Check "Rebuild the menu on submit"
  10. Submit

All terms are added at the root level of the main menu, regardless of their hierarchy.

The problem is that, when ported, the module is missing some crucial lines. Specifically, _taxonomy_menu_save() never calls _taxonomy_menu_insert_menu_item(), which results in the taxonomy_menu table not being populated upon rebuilding of the menu links. In fact, in the Backdrop version, _taxonomy_menu_insert_menu_item() is NEVER called, meaning that the table is never used.

argiepiano commented 2 months ago

The PR #14 also fixes #11. So, to test, if you applied PR #12 you must revert it before applying #14.

argiepiano commented 2 months ago

Duplicate of #8.

jenlampton commented 2 weeks ago

Closing in favor of https://github.com/backdrop-contrib/taxonomy_menu/issues/8