WordPress.org

Make WordPress Core

Opened 8 years ago

Last modified 3 years ago

#14093 new defect (bug)

Malformed category hidden from edit-tags, but shows in meta box

Reported by: nacin Owned by:
Milestone: Future Release Priority: low
Severity: normal Version:
Component: Taxonomy Keywords: needs-patch needs-nacin
Focuses: Cc:

Description

Came from a report in IRC by xomp.

In the following example, category 1's parent is category 2, and vice versa.

mysql> select term_taxonomy_id, term_id, taxonomy, parent from wp_term_taxonomy;
+------------------+---------+---------------+--------+
| term_taxonomy_id | term_id | taxonomy      | parent |
+------------------+---------+---------------+--------+
|                1 |       1 | category      |      2 |
|                2 |       2 | category      |      1 |
|                3 |       3 | category      |      0 |
|                4 |       4 | category      |      1 |
+------------------+---------+---------------+--------+
4 rows in set (0.00 sec)

mysql> select term_id, name from wp_terms;
+---------+-----------------+
| term_id | name            |
+---------+-----------------+
|       1 | Category 1      |
|       2 | Category 2      |
|       3 | Category 3      |
|       4 | Category 4      |
+---------+-----------------+
4 rows in set (0.00 sec)

On edit-tags, you'll see only Category 3.

In the hierarchical meta box, you'll see:

Category 3
Category 1
 - Category 2
 - Category 4

If we decide to show corrupted data, we should be consistent. At the very least, edit-tags should reveal more than the meta box, not the other way around.

Change History (6)

#1 @nacin
8 years ago

I imagine this should be handled by [15806].

#2 @nacin
8 years ago

  • Keywords reporter-feedback added

#3 @ocean90
7 years ago

nacin, you are the reporter. :)

#4 @mdawaffe
7 years ago

  • Keywords needs-patch added; reporter-feedback removed
  • Milestone changed from Awaiting Review to Future Release

Maybe loop through get_term_children() on upgrade to find and break loops.

#5 @chriscct7
4 years ago

Nacin did you want to revisit this?

#6 @chriscct7
3 years ago

  • Keywords needs-nacin added
Note: See TracTickets for help on using tickets.