visualizer/upsert-chart fails with undefined wp_tempnam() in REST/MCP requests
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 57/100
調査の方向性
Start in classes/Visualizer/Module/Abilities.php, reading buildManualSource() around lines 1153–1205 and tracing its call from executeUpsertChart(); compare _getCSV() in classes/Visualizer/Module.php for how another path handles the optional helper. Add coverage for manual-data upserts through fresh REST/MCP requests with dry_run both enabled and disabled. Done means valid requests return a preview or create the chart without an undefined wp_tempnam() error.
索引モデルが issue の本文から書いたものです。
説明
Summary
Creating a chart with manual column and row data through visualizer/upsert-chart can fail with Call to undefined function wp_tempnam(). The submission reports the error while creating a combo chart, including with dry_run enabled. Valid requests are expected to create the chart or return a validation preview; affected requests terminate instead, preventing both creation and dry-run validation.
Customer context
- Product / area: Visualizer, visualizer/upsert-chart ability exposed through Easy MCP AI
- Version: Easy MCP AI 2.2.2 reported; installed Visualizer version not provided. The relevant defect is present in inspected Visualizer tags v4.0.9–v4.0.11.
- Environment: REST/MCP ability invocation; WordPress and PHP versions not provided
- Reported symptom: Undefined wp_tempnam() while creating a combo chart, with and without dry_run
- Impact: Chart creation and validation preview fail
Reproduction notes
Reported: invoke wp_ability_visualizer_upsert_chart to create a combo chart; both normal and dry-run calls fail with undefined wp_tempnam(). Source-derived verification case: enable the Visualizer ability on WordPress with the Abilities API, use an authorized account and a permitted chart type, supply valid typed columns and nonempty rows, and invoke it through a fresh REST/MCP request without the admin file helper preloaded. Repeat with dry_run true and false. Not executed locally; exact reporter payload and installed Visualizer version are unavailable.
Diagnosis
Conclusion
Visualizer's manual-data ability path calls an admin-file helper without establishing that its defining file is loaded. The reported undefined-function error matches this source defect. Valid typed columns and rows reach the call before the dry-run return. This is a dependency-loading defect, not evidence of mixed Visualizer class versions.
Where this likely occurs
classes/Visualizer/Module/Abilities.php—Visualizer_Module_Abilities::executeUpsertChart()lines 631–669 invokes manual-source construction; its dry-run return is later at lines 691–700.classes/Visualizer/Module/Abilities.php—Visualizer_Module_Abilities::buildManualSource()lines 1153–1205 validates the supplied data and then callswp_tempnam()without loading its defining include.index.php—visualizer_launch()lines 135–152 registers the abilities module outside the conditional admin-module branch;visualizer_autoloader()lines 43–51 resolves Visualizer classes, not WordPress functions.classes/Visualizer/Module.php—Visualizer_Module::_getCSV()lines 266–276 demonstrates that another Visualizer path explicitly accounts for this helper's optional availability.- Commit
54b9615dintroduced the abilities module. The unguarded call is present in release tags v4.0.9, v4.0.10, and v4.0.11. No previously working ability version was established, so this is not classified as a regression.
Engineering notes
The callback is implemented by the free Visualizer plugin; inspection of visualizer-pro found no replacement for this ability path. Easy MCP 2.2.2 bridges enabled abilities to their callbacks rather than implementing chart creation. The failure depends on whether another request component has already loaded the WordPress helper. WordPress's official wp_tempnam() reference was checked and identifies wp-admin/includes/file.php as its defining file; WordPress core was not present in the inspected plugin checkout. The constructed reachable input is a permitted chart type with valid manual columns and rows, regardless of dry_run. The reporter's precise input and installed Visualizer version remain unknown.
Test coverage status
tests/test-chart-data-sanitization.php — test_get_chart_ability_returns_stored_cells() lines 111–117 covers the read ability, not chart upsert or its non-admin dependency loading. No relevant upsert/dry-run coverage was found during inspection. Runtime reproduction and PHPUnit execution were unavailable because PHP is not installed in this workspace environment.
What to verify or explore next
- Reproduce through a fresh REST/MCP request in which
wp_tempnam()is initially unavailable, using valid manual columns and rows. - Compare dry_run true and false, checking validation output and chart persistence respectively.
- Confirm the reported combo-chart case with a plan that permits that chart type, and compare a supported free chart type.
- Check the installed Visualizer version and whether other active plugins incidentally load the admin file helper.
Unknowns / follow-up
The original chart payload, WordPress/PHP versions, and installed Visualizer/Pro versions were not supplied. The failure was source-confirmed rather than reproduced locally. No matching open issue was found in the Visualizer issue searches.
Confidence
Confidence: 96/100
The exact missing helper is called unconditionally on a reachable manual-data path before the dry-run branch, and its defining include is not established by that path in the inspected releases.
Source: automated in-product feedback — easy-mcp-ai, 2026-11-16
Generated by bug-report-triage (ID: bug-report-triage_6afbe41e54a3b6.69081491)
- 主要言語
- PHP
- スター
- 108
- フォーク
- 29
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Codeinwp/visualizer のほかの issue
-
feature-request-triage
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
Codeinwp/visualizer#1388 ·
メンテナーはふだん 1 日以内に返信
-
Add a Default value for font settings再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
Codeinwp/visualizer#1111 ·
メンテナーはふだん 1 日以内に返信
-
customer report doc-needed new feature
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Codeinwp/visualizer#1058 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
Codeinwp/visualizer#1024 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
new feature
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Codeinwp/visualizer#1002 ·
メンテナーはふだん 1 日以内に返信
Codeinwp/visualizer の issue をすべて見る
似ている issue
-
Change: check an identifier filter the same way in every tool - the order of somcp_search_ordersオープンconsistency enhancement Orders
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
novalo-dev/Prestashop-MCP-Server#343 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
claude
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
sprain/sprainocchio#45 ·
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信