Skip to content

Incomplete Causes → Themes rename leaves a dead cause taxonomy reference #140

Description

@Herm71

Summary

The Causes → Themes taxonomy rename in #10 (closing #9, 2025-06-28) was incomplete. It renamed the taxonomy itself but left two references to the old cause slug behind. No cause taxonomy has existed since that commit.

The registered taxonomies are keyword, area, fund-type and fund-theme.

The two leftovers

1. lib/templates/parts/funds-search.php:6 — a categories dropdown pointed at the dead slug:

<!-- wp:categories {"taxonomy":"cause","displayAsDropdown":true} /-->

This is the user-visible one. funds-search.php is required by taxonomy-fund-type.php and taxonomy-fund-theme.php, so every Fund Type and Fund Theme term archive renders a categories block against a taxonomy that does not exist. The section is meant to show two dropdowns side by side — Areas and Themes — and can only ever show one.

Reproduce: any /fund-theme/<term>/ or /fund-type/<term>/ URL.

2. acf-json/post_type_67b609ae42d72.json — the fund post type declares:

"taxonomies": ["keyword", "area", "cause"]

Worth noting this array is not what attaches taxonomies here: each taxonomy JSON carries its own object_type: ["fund"], which is why fund-type works despite not being listed. So this entry is broken metadata rather than a functional break — but it is still wrong, and it is the kind of thing that misleads the next person reading the data model.

Proposed fix

Change both references from cause to fund-theme.

For the post type JSON there is a second option: drop cause from the array entirely, since the array isn't doing the attaching and is already inconsistent (it omits fund-type). Either is defensible — worth a moment's thought rather than a reflex.

This one is safe to hand-edit, unlike the cover blocks in #133. core/categories is a dynamic block: the markup is a self-closing comment with no saved HTML, so changing an attribute cannot desynchronise it from a save() output and cannot trigger block validation errors.

History

Commit Date What
ff65aa3 2025-03-14 MVP — cause taxonomy created, listed in the post type
57b800b 2025-06-27 Templates added, funds-search.php references cause
dc93e42 2025-06-28 Rename. Touched only taxonomy_67c21accb9522.json → taxonomy_685f13ece98fd.json. Neither other reference updated.

Latent for roughly 17 months, surfacing now because these two templates are being exercised again.

Acceptance criteria

  • No reference to a cause taxonomy remains in the repo.
  • Fund Theme and Fund Type term archives render both dropdowns (Areas and Themes).
  • Decision recorded on whether the post type's taxonomies array names fund-theme or simply drops the stale entry.

Note

Found while checking a warning reported on /fund-theme/breakthrough-research/ in local development. The exact warning text was not captured, so this is a confirmed bug on that page rather than a confirmed explanation of that specific message — if a warning persists after this is fixed, it is something else.

Unrelated to #139, which changed only how funds-search.php is located, not its contents.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions