Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Secondary networks never get Ultimate Multisite tables created or upgraded

已关闭
#2,009 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@superdav42 已经在做这个了。

开始于 2026年10月21日。

  • #2010 来自 @superdav42 —— 已关闭,未合并

评估

这个 Issue 还没有评估数据。

描述

bug origin:interactive status:claimed

Problem

Ultimate Multisite only creates and upgrades its tables on the main network. On any other network in the same database it queries wp_wu_{N}_* tables but never creates them, and existing secondary-network tables never receive schema upgrades.

  • inc/database/engine/class-table.php: is_upgradeable() returns false unless is_main_network(). BerlinDB's maybe_upgrade() (on admin_init) is the only automatic install/upgrade path, so it never runs on other networks. This has been the case since the initial commit.
  • The only other path is Core_Installer::_install_database_tables() (setup wizard), which calls $table->install() directly.
  • Multinetwork's cloner only creates unsuffixed wp_wu_* tables in tenant databases. Nothing creates wp_wu_{N}_* for networks in the same database.
  • Tables with $upgrades (9 classes, e.g. 2.13.2, 2.17.4) are never upgraded on secondary networks.
Reproduction

On current main, create network 3 (wu_create_network()) and mark setup finished. Table_Loader registers wp_wu_3_customers, but is_upgradeable() is false and exists() is false, and wu_get_customers() fails with Table '…wu_3_customers' doesn't exist.

Fix

  1. Engine\Table::is_upgradeable(): allow the main site of any network (is_main_site()).
  2. On secondary networks, run each table's maybe_upgrade() on the first request (front end included), gated by one per-network option holding the tables' schema signature, so it runs once per schema change. Per-network version keys already exist (wpdb_wu_{N}_{table}_version, stored on the main network).
Files
  • inc/database/engine/class-table.php
  • inc/loaders/class-table-loader.php
  • tests/WP_Ultimo/Database/Engine/Table_Test.php

Verification

  • A new secondary network gets all plugin tables on its first request, and model queries have no DB errors.
  • A secondary-network table with an older recorded version runs its pending upgrade.
  • The main network behaves as before. Later requests don't re-run the check (a single option read).

aidevops.sh v3.39.49 plugin for OpenCode with claude-opus-5-5

主要语言
PHP
星标
218
派生
87
平均合并
1 天 5 小时
30 天内合并 PR
97

环境准备

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

从这里开始

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

Ultimate-Multisite/ultimate-multisite 的其他 Issue

查看 Ultimate-Multisite/ultimate-multisite 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

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