Convert $term->depth to a (computed?) field

Created on 11 July 2014, about 11 years ago
Updated 30 June 2025, 26 days ago

Follow-up from #1498660: Refactor taxonomy entity properties to multilingual :

Not sure how to do this. $depth is populated on the fly in taxonomy_get_tree() [...]
I've renamed the method getTreeDepth(), but it's confusing because someone might think he can get the depth of the term always, while this happens only when the term was returned by taxonomy_get_tree().

Mmh, this is a leftover of an approach that in D8 should no longer exist, that is storing non-field data on entity objects just to pass it around more easily. Probably the right way to do this in D8 is by using a computed field, but I think this deserves its own issue, where we can discuss the proper implementation.

📌 Task
Status

Postponed: needs info

Version

11.0 🔥

Component

taxonomy.module

Created by

🇮🇹Italy plach Venezia

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • 🇺🇸United States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024