More than 256 tags fails the whole import: taxonomy entity count bound is far below real blog vocabularies

未关闭
#7,463 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
php
领域
backend, data

调研方向

The bound is enforced in php-transformer/src/WordPressSitePlan/ArchiveEntities.php: assertTerms at line 64 for taxonomy terms, line 20 for authors. Read TaxonomyProjection to see how one post_tag entity is created per declared term name, then raise the vocabulary bound and replace the throw with truncation (archived terms first, then most-used) emitting a wordpress_site_plan_taxonomy_* diagnostic. Add a neutral-plan fixture with 2 posts and 1,000 tags plus an over-bound case, and run the WordPressSitePlan tests to confirm the fixture fails on trunk.

由索引模型根据 Issue 内容生成。

描述

Problem

ArchiveEntities::assertTerms (php-transformer/src/WordPressSitePlan/ArchiveEntities.php:64) throws WordPress site plan taxonomy entity count exceeds its bound. when a plan has more than 256 taxonomy entities. That aborts materialization of the whole site. TaxonomyProjection creates one post_tag entity per declared term name, archived or not, so any blog with more than 256 distinct tags cannot import. The bound on each term's membership list is 10,000, which shows the vocabulary bound is the outlier. Author entities have the same 256 cap (line 20).

Evidence

andreanolen.com is a Squarespace blog with 163 posts and 3,068 distinct terms (5,972 post-term assignments). DLA's content-index.json declares them per post (terms: [...]). I imported only the 163 posts and 5 pages, with no term-archive files, using SSI 1.38.24 through Studio. Compile finished, then materialization failed:
static_site_importer_direct_artifact_phase_failed: Materialization failed … WordPress site plan taxonomy entity count exceeds its bound.
Tag-heavy blogs are common: WordPress, Blogger and Squarespace sites regularly have thousands of tags.

Expected

  • The taxonomy vocabulary bound fits real blogs, consistent with the 10,000-member list bound. Term entities are small, so a five-figure bound costs little.
  • A site over the bound does not lose every post. Project the terms the plan can carry, prioritizing archived terms and then the most-used, and report the rest as a wordpress_site_plan_taxonomy_* diagnostic. Do not throw.

Acceptance

A neutral plan fixture with 2 posts declaring 1,000 distinct tags materializes, and every tag is assigned. A plan above the new bound degrades with a diagnostic instead of throwing. The test fails on trunk.

主要语言
PHP
星标
29
派生
6
平均合并
3 小时 44 分钟
30 天内合并 PR
812

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Automattic/blocks-engine 的其他 Issue

查看 Automattic/blocks-engine 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。