Skip to content

wp.org anima-lt build ships without the portfolio/gallery/testimonial block templates #602

Description

@georgeolaru

Symptom

The distributed anima-lt package (the wp.org build) ships without any of the custom post type block templates that pixelgrade/anima contains. On a live customer install running Anima LT 2.0.49, every one of these returns 404 while the same files exist in the source repo:

Template in pixelgrade/anima in installed anima-lt 2.0.49
templates/archive-portfolio.html present (16 KB) 404
templates/single-portfolio.html present (22 KB) 404
templates/taxonomy-portfolio_type.html present 404
templates/taxonomy-portfolio_tag.html present 404
templates/archive-gallery.html present (16 KB) 404
templates/single-gallery.html present 404
templates/archive-testimonial.html present 404
templates/single-testimonial.html present (22 KB) 404
templates/single-split-header.html present (7 KB) 404

The product templates (archive-product.html, single-product.html, taxonomy-product_cat.html, taxonomy-product_tag.html) are present in the installed package, so the omission is inconsistent rather than a deliberate "no CPTs in the wp.org build" rule.

Evidence that this is the wp.org build

templates/front-page.html returns 200 on the installed theme, but that file exists only under wporg/templates/ in the repo — it is not in the source templates/ directory. So the installed package went through the wp.org overlay.

tasks/build-wporg.js:137-153 documents the mechanism:

// Preserve the premium Nova Blocks templates in a non-registered location before
// the wporg/ overlay replaces templates/ and parts/ with plugin-free defaults.
// WordPress auto-registers only files under templates/ and parts/.
const novablocksTemplateVariantFiles = [
    'templates/page.html',
    'templates/single.html',
    'templates/home.html',
    'templates/index.html',
    'templates/archive.html',
    'templates/search.html',
    ...
]

wporg/templates/ contains only: 404.html, archive.html, front-page.html, home.html, index.html, page.html, search.html, single.html. The overlay replaces the whole templates/ directory, so every CPT template in the source is dropped.

Impact

A site that imports an LT starter design with projects has no parent-theme template to render the project archive or a single project. The customer install this was found on only renders correctly because Create Block Theme baked archive-portfolio.html and single-portfolio.html into the generated anima-lt-child — remove or regenerate the child theme and the project pages lose their templates.

Repro

  1. Install the distributed anima-lt 2.0.49 package.
  2. Request wp-content/themes/anima-lt/templates/archive-portfolio.html — 404.
  3. Request wp-content/themes/anima-lt/templates/front-page.html — 200 (wp.org-overlay-only file, confirming the build variant).
  4. Compare against pixelgrade/anima 2.0.49 templates/, which contains all nine files above.

Suggested fix

Have the wp.org overlay replace only the templates it actually needs to strip of Nova Blocks markup, rather than swapping the entire templates/ and parts/ directories — or add plugin-free variants of the CPT templates to wporg/templates/.

HelpScout: https://secure.helpscout.net/conversation/3433723183

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions