From 81324903a61fa7eec68e206a8f72c091bb2e361d Mon Sep 17 00:00:00 2001 From: wpdev Date: Mon, 28 Sep 2026 00:46:56 +0800 Subject: [PATCH] chore(2meet-data-optimizer): 1.4.1 release notes and version - CHANGELOG / readme: PR-130..133 (2.4 acceptance review fixes) - Version 1.4.0 -> 1.4.1 (header, TMDO_VERSION, Stable tag) - PR: PR-134 --- 2meet-data-optimizer.php | 4 ++-- CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ readme.txt | 8 +++++++- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/2meet-data-optimizer.php b/2meet-data-optimizer.php index 09ed6bd..ec92a55 100644 --- a/2meet-data-optimizer.php +++ b/2meet-data-optimizer.php @@ -3,7 +3,7 @@ * Plugin Name: 2meet Data Optimizer * Plugin URI: https://2meet.io/2meet-data-optimizer * Description: 通用 WordPress 反 EAV 引擎:將 postmeta / usermeta / termmeta / commentmeta 自動分流至四象限扁平表(Hot / Warm / Cold / Archive),大幅提升搜尋與篩選效能。從 wp-data-optimizer v2.16.0 提煉的純核心,整合層交給 11 個 AddOn。 - * Version: 1.4.0 + * Version: 1.4.1 * Requires at least: 6.0 * Tested up to: 6.9.4 * Requires PHP: 8.1 @@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) { } // ── Constants ────────────────────────────────────────────────────────────── -define( 'TMDO_VERSION', '1.4.0' ); +define( 'TMDO_VERSION', '1.4.1' ); define( 'TMDO_DB_VERSION', '2.1.0' ); define( 'TMDO_PATH', plugin_dir_path( __FILE__ ) ); define( 'TMDO_URL', plugin_dir_url( __FILE__ ) ); diff --git a/CHANGELOG.md b/CHANGELOG.md index 80d7f35..cc5f5cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,37 @@ Versioning follows [Semantic Versioning](https://semver.org/). --- +## [1.4.1] — 2026-09-28 — 2.4 驗收修正 + +**性質**:修正。無 schema 變更。來源:2.4 全面驗收的 security review 與 correctness review。 + +### Fixed + +- **meta_key 的排序不再被清掉**:查詢帶 `meta_key`,且 orderby 在多個排序(陣列或 + `'meta_value date'`)中仍有 `meta_value`、`meta_value_num` 或該 key 名稱時,1.4.0 會把 + meta_key 當 EXISTS 路由並清空,WordPress 因此丟掉價格排序。現在只在 orderby 完全沒有引用它時 + 才路由;`meta_compare_key` 不是 `=`(例如 LIKE 會比對到其他 key)時維持原生;排序形狀的 + group 只有在 orderby 沒有引用它、`meta_value(_num)` 或它的 key 時才當成未使用而略過(沒有 + meta_key 時它是 WordPress 的主要 clause)。(PR-130) +- **ORDER BY 只改寫單獨的 `posts.ID`**:flat-first 與 copy route 共用 `ties_on_post_id()`; + 外掛加上的 `FIELD(wp_posts.ID, …)`、`(wp_posts.ID IN (…))` 等運算式保持原樣。1.4.0 會在 + 運算式內插入方向,SQL 語法錯誤、頁面沒有結果。正則失敗(PCRE 回溯或 JIT 上限)時回傳原 + SQL,不再變成空字串。(PR-131) +- 呼叫端以 `new WP_Query( array( … ) )` 預設的 router 內部 query var(`wpdo_post_clauses`、 + `wpdo_post_sort`、`wpdo_post_copy_route`、`wpdo_post_count_sql`)一律清除;copy route 的 + 排序方向改用白名單。無法從網址觸發。(PR-132) +- 新文章建立的空 flat 列一併寫入 `post_status` / `post_date` 副本(`wp_insert_post` 在 + `transition_post_status` 之後才執行,原本留下 NULL,會讓整個 group 關閉 copy route); + `wp tmdo post-status-sync` 完成後遞增路由計數版本(dry run 不遞增)。(PR-133) + +### 已知、未修改 + +- 1.4.0 的 flat-first 排序同值時依 ID 與排序同方向(原生為 ID DESC),集合與總數相同(已接受)。 +- 若日後有 group 註冊名為 `post_status` / `post_date` 的欄位,遷移引擎寫副本時 `$data` 與 + `$formats` 會錯位;目前沒有這樣的 group。 + +--- + ## [1.4.0] — 2026-09-28 — 百萬級 listing 的路由排序與日期查詢(hardening 2.4) **性質**:效能 + 修正。無 schema 變更;post status/date 副本的索引改為三欄(見「升級後」)。 diff --git a/readme.txt b/readme.txt index 2b6ea07..f8df125 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: performance, database, postmeta, optimization, hivepress Requires at least: 6.0 Tested up to: 6.9 Requires PHP: 8.1 -Stable tag: 1.4.0 +Stable tag: 1.4.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -107,6 +107,12 @@ The Classifier tab analyzes your existing `wp_postmeta` data (access frequency, == Changelog == += 1.4.1 = +* A query ordered by its meta_key among several orderings (or by the key's name) keeps meta_key native; meta_compare_key other than '=' is not routed; a sort group stays when orderby may use it as the primary clause +* Only standalone posts.ID terms in ORDER BY become flat post_id tie-breaks (FIELD()/IN expressions from other plugins are left alone); PCRE failures keep the original SQL +* Router query vars preset by callers are dropped +* New posts' flat rows get their status/date copies; post-status-sync invalidates cached routed counts + = 1.4.0 = * Flat-first sorts read the ID tie-break from the flat post_id, so a declared (column, post_id) index returns rows in order; ties now follow the sort direction * Meta clauses without a value route as EXISTS; HivePress's featured-listing lookup on every search page uses the flat table