Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Error Unknown format specifier #1662

Closed
marcinkrzeminski opened this issue Dec 21, 2024 · 0 comments · Fixed by #1663
Closed

Fatal Error Unknown format specifier #1662

marcinkrzeminski opened this issue Dec 21, 2024 · 0 comments · Fixed by #1663
Labels
bug support forum From the WP.org plugin support forum

Comments

@marcinkrzeminski
Copy link
Collaborator

marcinkrzeminski commented Dec 21, 2024

Bug Report

https://wordpress.org/support/topic/fatal-error-unknown-format-specifier-2/
https://wordpress.org/support/topic/fatal-error-when-saving-the-seo-title-meta-with-in-the-post-title/

Expected Behavior

Describe what should happen.

Actual Behavior

I’ve seen others post this same error but the topic was closed with no response or solution given. We are getting the following error when publishing at times

[29-Jan-2024 23:22:06 UTC] PHP Fatal error: Uncaught ValueError: Unknown format specifier “O” in */public_html/wp-content/plugins/stream/classes/class-log.php:127
Stack trace: 0 */public_html/wp-content/plugins/stream/classes/class-log.php(127): vsprintf(‘Updated “conten…’, Array) 1 [internal function]: WP_Stream\Log->log(‘wordpressseo’, ‘Updated “conten…’, Array, 9072, ‘wpseo_meta’, ‘updated’, 21156) 2 */public_html/wp-content/plugins/stream/classes/class-connector.php(178): call_user_func_array(Array, Array) 3 */public_html/wp-content/plugins/stream/connectors/class-connector-wordpress-seo.php(433): WP_Stream\Connector->log(‘Updated “conten…’, Array, 9072, ‘wpseo_meta’, ‘updated’) 4 */public_html/wp-content/plugins/stream/connectors/class-connector-wordpress-seo.php(368): WP_Stream\Connector_WordPress_SEO->meta(9072, ‘_yoast_wpseo_co…’, ’30’) 5 [internal function]: WP_Stream\Connector_WordPress_SEO->callback_updated_post_meta(NULL, 9072, ‘_yoast_wpseo_co…’, ’30’) 6 */public_html/wp-content/plugins/stream/classes/class-connector.php(127): call_user_func_array(Array, Array) 7 */public_html/wp-includes/class-wp-hook.php(324): WP_Stream\Connector->callback(‘1253795’, 9072, ‘_yoast_wpseo_co…’, ’30’) 8 */public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 9 */public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 10 */public_html/wp-includes/meta.php(336): do_action(‘updated_post_me…’, ‘1253795’, 9072, ‘_yoast_wpseo_co…’, ’30’) 11 */public_html/wp-includes/post.php(2558): update_metadata(‘post’, 9072, ‘_yoast_wpseo_co…’, ’30’, ”) 12 */public_html/wp-content/plugins/wordpress-seo/inc/class-wpseo-meta.php(717): update_post_meta(9072, ‘_yoast_wpseo_co…’, ’30’) 13 */public_html/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox.php(806): WPSEO_Meta::set_value(‘content_score’, ’30’, 9072) 14 */public_html/wp-includes/class-wp-hook.php(326): WPSEO_Metabox->save_postdata(9072) 15 */public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 16 */public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 17 */public_html/wp-includes/post.php(4771): do_action(‘wp_insert_post’, 9072, Object(WP_Post), true) 18 */public_html/wp-includes/post.php(4862): wp_insert_post(Array, false, true) 19 */public_html/wp-admin/includes/post.php(453): wp_update_post(Array) 20 */public_html/wp-admin/post.php(227): edit_post() 21 {main

I’m facing an issue similar to this https://wordpress.org/support/topic/your-site-is-experiencing-a-technical-issue-85/. I actually managed to reproduce the issue I’m going to mention below in an empty site with just Stream and Yoast SEO (free) installed.

When those two plugins are activated, if a post has the “%” character in its title, and the user is also changing the Yoast SEO title for that post, the attempt to save the Yoast SEO metabox throws a PHP Error

[15-Jan-2024 11:33:23 UTC] PHP Fatal error: Uncaught ValueError: Unknown format specifier “”” in D:\XYZ\LocalSites\stream\app\public\wp-content\plugins\stream\classes\class-log.php:127
Stack trace: 0 D:\XYZ\LocalSites\stream\app\public\wp-content\plugins\stream\classes\class-log.php(127): vsprintf(‘Updated “SEO ti…’, Array) 1 [internal function]: WP_Stream\Log->log(‘wordpressseo’, ‘Updated “SEO ti…’, Array, 5, ‘wpseo_meta’, ‘updated’, 1) 2 D:\XYZ\LocalSites\stream\app\public\wp-content\plugins\stream\classes\class-connector.php(178): call_user_func_array(Array, Array) 3 D:\XYZ\LocalSites\stream\app\public\wp-content\plugins\stream\connectors\class-connector-wordpress-seo.php(433): WP_Stream\Connector->log(‘Updated “SEO ti…’, Array, 5, ‘wpseo_meta’, ‘updated’) 4 D:\XYZ\LocalSites\stream\app\public\wp-content\plugins\stream\connectors\class-connector-wordpress-seo.php(368): WP_Stream\Connector_WordPress_SEO->meta(5, ‘_yoast_wpseo_ti…’, ‘%%title%% %%pag…’) 5 [internal function]: WP_Stream\Connector_WordPress_SEO->callback_updated_post_meta(NULL, 5, ‘_yoast_wpseo_ti…’, ‘%%title%% %%pag…’) 6 D:\XYZ\LocalSites\stream\app\public\wp-content\plugins\stream\classes\class-connector.php(127): call_user_func_array(Array, Array) 7 D:\XYZ\LocalSites\stream\app\public\wp-includes\class-wp-hook.php(324): WP_Stream\Connector->callback(’17’, 5, ‘_yoast_wpseo_ti…’, ‘%%title%% %%pag…’) 8 D:\XYZ\LocalSites\stream\app\public\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 9 D:\XYZ\LocalSites\stream\app\public\wp-includes\plugin.php(517): WP_Hook->do_action(Array) 10 D:\XYZ\LocalSites\stream\app\public\wp-includes\meta.php(336): do_action(‘updated_post_me…’, ’17’, 5, ‘_yoast_wpseo_ti…’, ‘%%title%% %%pag…’) 11 D:\XYZ\LocalSites\stream\app\public\wp-includes\post.php(2558): update_metadata(‘post’, 5, ‘_yoast_wpseo_ti…’, ‘%%title%% %%pag…’, ”) 12 D:\XYZ\LocalSites\stream\app\public\wp-content\plugins\wordpress-seo\inc\class-wpseo-meta.php(717): update_post_meta(5, ‘_yoast_wpseo_ti…’, ‘%%title%% %%pag…’) 13 D:\XYZ\LocalSites\stream\app\public\wp-content\plugins\wordpress-seo\admin\metabox\class-metabox.php(799): WPSEO_Meta::set_value(‘title’, ‘%%title%% %%pag…’, 5) 14 D:\XYZ\LocalSites\stream\app\public\wp-includes\class-wp-hook.php(326): WPSEO_Metabox->save_postdata(5) 15 D:\XYZ\LocalSites\stream\app\public\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 16 D:\XYZ\LocalSites\stream\app\public\wp-includes\plugin.php(517): WP_Hook->do_action(Array) 17 D:\XYZ\LocalSites\stream\app\public\wp-includes\post.php(4771): do_action(‘wp_insert_post’, 5, Object(WP_Post), true) 18 D:\XYZ\LocalSites\stream\app\public\wp-includes\post.php(4862): wp_insert_post(Array, false, true) 19 D:\XYZ\LocalSites\stream\app\public\wp-admin\includes\post.php(453): wp_update_post(Array) 20 D:\XYZ\LocalSites\stream\app\public\wp-admin\post.php(227): edit_post() 21 {main}
thrown in D:\XYZ\LocalSites\stream\app\public\wp-content\plugins\stream\classes\class-log.php on line 127

Steps to Reproduce the Problem

Screenshots

Drag and drop screenshots in this area that help illustrate the problem.

System Information

  • Stream plugin version:
  • WordPress version:
  • PHP version:
  • Browser:
  • Computer operating system:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug support forum From the WP.org plugin support forum
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant