Follow-up to #2348007: Taxonomy term view needs status filter

Problem/Motivation

In #2348007-36: Taxonomy term view needs status filter @alexpott said

taxonomy_select_nodes() has no usages - we should (in a followup) either write a test for it or remove it.

According to https://api.drupal.org/api/drupal/modules%21taxonomy%21taxonomy.module/f... in D7 only taxonomy_term_feed() and taxonomy_term_page() are using this function. Both of these functions are removed in #1857256: Convert the taxonomy listing and feed at /taxonomy/term/%term to Views

Proposed resolution

Remove it

Remaining tasks

Review it.
Commit it

User interface changes

None

API changes

None

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because it is removing dead code.
Issue priority Normal because it doesn't affect anything
Unfrozen changes Unfrozen because it only removes dead code.
Prioritized changes The main goal of this issue is removing previously deprecated code.
Disruption None

Comments

larowlan’s picture

Needs a change notice first, but then RTBC

jibran’s picture

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

hot dog!

webchick’s picture

Status: Reviewed & tested by the community » Needs work

This change is explicitly allowed in https://www.drupal.org/contribute/core/beta-changes, and searching the change listings for "taxonomy_select_nodes" brings up https://www.drupal.org/node/2084727 so we're good to go on the change record.

However, there's one other instance of this function after the patch:

/**
 * @defgroup taxonomy_index Taxonomy indexing
 * @{
 * Functions to maintain taxonomy indexing.
 *
 * Taxonomy uses default field storage to store canonical relationships
 * between terms and fieldable entities. However its most common use case
 * requires listing all content associated with a term or group of terms
 * sorted by creation date. To avoid slow queries due to joining across
 * multiple node and field tables with various conditions and order by criteria,
 * we maintain a denormalized table with all relationships between terms,
 * published nodes and common sort criteria such as sticky and created.
 * This is used as a lookup table by taxonomy_select_nodes(). When using other
 * field storage engines or alternative methods of denormalizing this data
 * you should set the taxonomy.settings:maintain_index_table to '0' to avoid
 * unnecessary writes in SQL.
 */

Those docs in taxonomy.module need to be updated.

jibran’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: +Documentation
StatusFileSize
new1.15 KB
new3.13 KB

Thank you for looking at it @webchick. Sorry I missed the docs. Here is the updated patch. In #2348007: Taxonomy term view needs status filter we added a new status column to taxonomy_index table so I updated the docs to accommodate that change as well.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update

This change is not unfrozen - but removing dead, untested code is prioritised so is allowed. We should have an additional change record detailing the removal of this function as contrib might be relying on it.

jibran’s picture

Status: Needs work » Needs review
Issue tags: -Needs issue summary update

Created taxonomy_select_nodes function has been removed for #6. Please improve.

alexpott’s picture

Sorry I was wrong in #6 - the existing CR is enough.

alexpott’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0a301aa and pushed to 8.0.x. Thanks!

Thanks for adding the beat evaluation to the issue summary.

  • alexpott committed 0a301aa on 8.0.x
    Issue #2384583 by jibran: Remove taxonomy_select_nodes function
    
jhedstrom’s picture

The change notice mentioned in #7 either doesn't exist, or is unpublished (I get a 404).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.