I would really like a "parent term" selection rule (see #1327004: Taxonomy: term parent (TID / name) selection rule please :)). Unfortunately, this is not that. What this is, is really a "has parent" selection rule. Can we please rename it as such?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jenlampton’s picture

Status: Active » Needs review
FileSize
540 bytes
jenlampton’s picture

On second thought, we should probably rename the whole file (and all functions within)

jenlampton’s picture

Issue tags: +Needs backport to D6

it looks like this was already done in the D7 version. :/ perhaps we just need a backport.

jenlampton’s picture

Title: Rename "Taxonomy: parent term" selection rule to "Taxonomy: term has parent" » Clarify "Taxonomy: parent term" vs "Taxonomy: term has parent(s)" in UI
Version: 6.x-1.x-dev » 7.x-1.x-dev
Component: Page Manager » User interface
Status: Needs review » Needs work

My thought is not to rename the whole inc file as to not get in the way of D7. Let's just clean up the UI so people know what the heck is going on.

jenlampton’s picture

Status: Needs work » Needs review
FileSize
1.55 KB

The names for these two access rules are backwards.

Term has parent(s) is boolean: does the term have parent(s)? yes/no.
But the config form asks you to choose specific parents.

Parent term should need to be specified: Which is the parent term?
But in this case you just select a vocabulary (uhm, what?!)

I propose the following cleanup:
1) Change the names of the two selection rules.
Proposed new names:
- "Taxonomy: term has any parent"
- "Taxonomy: parent term (specify)"

"Taxonomy: term has any parent" selection rule config cleanup
2) Remove the confusing vocabulary option on the config form as per #1343144: Remove Vocabulary select box from "Taxonomy: parent term" selection rule

"Taxonomy: parent term (specify)" selection rule config cleanup
3) Update the Description text on all the form elements that will help users choose wisely, as per #1889572: Clean up description text on Taxonomy term parent access rule config form

Attached patch is limited to the name change.

Chris Matthews’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs reroll

The 6 year old patch in #5 to term_has_parent.inc does not apply to the latest ctools 7.x-1.x-dev and needs a reroll.

Checking patch plugins/access/term_has_parent.inc...
Hunk #1 succeeded at 10 (offset 1 line).
Checking patch plugins/access/term_parent.inc...
error: while searching for:
);

/**
 * Settings form for the 'by parent term' access plugin
 */
function ctools_term_parent_ctools_access_settings($form, &$form_state, $conf) {
  // If no configuration was saved before, set some defaults.

error: patch failed: plugins/access/term_parent.inc:22
error: plugins/access/term_parent.inc: patch does not apply
Andrew Answer’s picture