AIO 3.14.0: Abilities schemas trigger Undefined array key "type"
Support › Meta Box AIO › AIO 3.14.0: Abilities schemas trigger Undefined array key "type"
- This topic has 0 replies, 1 voice, and was last updated 15 minutes ago by
Simon Egle.
-
AuthorPosts
-
November 12, 2026 at 12:33 PM #50272
Simon Egle
ParticipantHello Meta Box support team,
We found a reproducible schema-validation issue with Meta Box AIO 3.14.0. MCP Adapter 0.7.1 is also active. This concerns the Meta Box Abilities API integration, separately from the previous _id parser issue.
Our current PHP log contains 30 warnings: Undefined array key "type" in wp-includes/rest-api.php, at lines 2251, 2266 and 2275. The first was recorded on 10 November 2026 at 17:38:22 UTC and the last on 11 November at 07:06:39 UTC. No later occurrences were present when checked on 12 November. The historical requests cannot be individually identified from this log.
Confirmed finding:
In wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box/src/Abilities.php, the value property of meta-box/get-field-value has a description but no type in both its input and output schemas. The output definition is around lines 134-135. The example property of meta-box/get-field-value-format also lacks a type; that property was inspected but not separately reproduction-tested.Minimal reproduction:
Save the following as metabox-schema-repro.php and run it from the WordPress directory withwp eval-file metabox-schema-repro.php. Meta Box abilities must be registered. This only validates synthetic data; it does not execute an ability, read a stored field, or modify any content.<?php $a = wp_get_ability("meta-box/get-field-value"); if (!$a) { echo "Meta Box ability is not registered.\n"; return; } foreach (["input_without_value", "output_with_value"] as $case) { $warnings = []; set_error_handler(function ($n, $s, $f, $l) use (&$warnings) { $warnings[] = basename($f) . ":" . $l . " " . $s; return true; }); $result = $case === "input_without_value" ? $a->validate_input(["field_id" => "diagnostic_only", "object_id" => 9485]) : rest_validate_value_from_schema(["value" => "test"], $a->get_output_schema(), "output"); restore_error_handler(); echo $case . " warnings=" . count($warnings) . " result=" . (is_wp_error($result) ? $result->get_error_code() : json_encode($result)) . PHP_EOL; echo implode(PHP_EOL, $warnings) . PHP_EOL; }Observed output:
input_without_value warnings=0 result=true output_with_value warnings=3 result=true rest-api.php:2251 Undefined array key "type" rest-api.php:2266 Undefined array key "type" rest-api.php:2275 Undefined array key "type"The object_id is only passed to schema validation and is not looked up. In a separate test, adding value => "test" to the input also produced the same three warnings.
Expected: validation of the registered Meta Box schemas should not emit PHP warnings.
Actual: validation returns true but emits three warnings when it reaches the untyped value property. This reproduces the exact warning text and source lines in our log, although it does not prove that all 30 historical entries came from this particular ability.No plugin or WordPress core files were changed. The test warnings were captured locally by the temporary error handler; the original log count remained 30.
Could you please check the value/example schema definitions and provide an official fix compatible with WordPress schema validation while preserving the supported field-value types?
Thank you,
Simon -
AuthorPosts
- You must be logged in to reply to this topic.