Secondary networks never get Ultimate Multisite tables created or upgraded
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
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 unlessis_main_network(). BerlinDB'smaybe_upgrade()(onadmin_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 createswp_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
Engine\Table::is_upgradeable(): allow the main site of any network (is_main_site()).- 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.phpinc/loaders/class-table-loader.phptests/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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Ultimate-Multisite/ultimate-multisite 的其他 Issue
-
Remediate dependency alert: qs (npm)可能已有人在做 @superdav42 今天认领。 未关闭origin:worker security status:in-review tier:standard type:bug
Ultimate-Multisite/ultimate-multisite#2041 · 6 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
feat: package fonts for more invoice PDF languages (Hebrew, Thai, Lao, Khmer, Myanmar, Sinhala, Kannada, Telugu, Sindhi)可能已有人在做 @superdav42 今天认领。 未关闭auto-dispatch enhancement status:in-review tier:standard
Ultimate-Multisite/ultimate-multisite#2039 · 6 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
perf: lazy-load the top My Sites toolbar and defer initial site-list hydration可能重新可做 关联的 PR 已关闭且未合并。 未关闭enhancement origin:worker priority:medium source:conflict-feedback status:available tier:standard
难度 5/5 一周以上 新手友好度 25/100
Ultimate-Multisite/ultimate-multisite#2015 · 24 条评论 ·
维护者通常 1 天内回复
-
auto-dispatch needs-investigation origin:worker security status:available tier:standard type:bug
难度 3/5 半天 新手友好度 30/100
Ultimate-Multisite/ultimate-multisite#1930 ·
维护者通常 1 天内回复
-
auto-dispatch review:approve status:available tier:standard
难度 3/5 1-2 天 新手友好度 48/100
Ultimate-Multisite/ultimate-multisite#1925 · 4 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 Ultimate-Multisite/ultimate-multisite 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
backdrop-contrib/print#58 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
laravel/nova-issues#7008 ·
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
FriendsOfFlarum/badges#20 ·
-
[Dashboard Redesign] Support and Documentation links should warn they'll be opened in another tab未关闭Module: dashboard type: enhancement
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复