WordPres 6.3 issue
-
Hi,
I would like to report you a bug after updating to WordPress 6.3. I am unable to post and I always get this error message:
The page I need help with: [log in to see the link]
-
[09-Aug-2023 12:23:24 UTC] PHP Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/domain/public_html/wp-includes/functions.wp-styles.php on line 90
[09-Aug-2023 12:27:04 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function wp_get_footnotes_from_revision(), 2 passed in /var/www/domain/public_html/wp-includes/class-wp-hook.php on line 310 and exactly 3 expected in /var/www/domain/public_html/wp-includes/blocks/footnotes.php:211
Stack trace: 0 /var/www/domain/public_html/wp-includes/class-wp-hook.php(310): wp_get_footnotes_from_revision() 1 /var/www/domain/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() 2 /var/www/domain/public_html/wp-content/plugins/email-post-changes/class.email-post-changes.php(106): apply_filters() 3 /var/www/domain/public_html/wp-includes/class-wp-hook.php(310): Email_Post_Changes->post_updated() 4 /var/www/domain/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() 5 /var/www/domain/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 6 /var/www/domain/public_html/wp-includes/post.php(4720): do_action() 7 /var/www/domain/public_html/wp-includes/post.php(4853): wp_insert_post() 8 /var/www/domain/public_html/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(880): wp_update_post() 9 /var/www/domain/public_html/wp-includes/rest-api/class-wp-rest-server.php(1188): WP_REST_Posts_Controller->update_item() 10 /var/www/domain/public_html/wp-includes/rest-api/class-wp-rest-server.php(1035): WP_REST_Server->respond_to_request() 11 /var/www/domain/public_html/wp-includes/rest-api/class-wp-rest-server.php(447): WP_REST_Server->dispatch() 12 /var/www/domain/public_html/wp-includes/rest-api.php(418): WP_REST_Server->serve_request() 13 /var/www/domain/public_html/wp-includes/class-wp-hook.php(310): rest_api_loaded() 14 /var/www/domain/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() 15 /var/www/domain/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() 16 /var/www/domain/public_html/wp-includes/class-wp.php(398): do_action_ref_array() 17 /var/www/domain/public_html/wp-includes/class-wp.php(779): WP->parse_request() 18 /var/www/domain/public_html/wp-includes/functions.php(1335): WP->main() 19 /var/www/domain/public_html/wp-blog-header.php(16): wp() 20 /var/www/domain/public_html/index.php(17): require(‘…’) 21 {main}thrown in /var/www/domain/public_html/wp-includes/blocks/footnotes.php on line 211
thrown in /var/www/domain/public_html/wp-includes/blocks/footnotes.php on line 211
- This reply was modified 1 year, 3 months ago by whanklee.
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function wp_get_footnotes_from_revision(), 2 passed in /wp-includes/class-wp-hook.php on line 310 and exactly 3 expected in /wp-includes/blocks/footnotes.php:211
Stack trace: 0 /wp-includes/class-wp-hook.php(310): wp_get_footnotes_from_revision(”, ‘footnotes’) 1 /wp-includes/plugin.php(205): WP_Hook->apply_filters(”, Array) 2 /wp-content/plugins/email-post-changes/class.email-post-changes.php(103): apply_filters(‘_wp_post_revisi…’, ”, ‘footnotes’) 3 /wp-includes/class-wp-hook.php(310): Email_Post_Changes->post_updated(2892, Object(WP_Post), Object(WP_Post)) 4 /wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) 5 /wp-includes/plugin.php(517): WP_Hook->do_action(Array) 6 /wp-includes/post.php(4720): do_action(‘post_updated’, 2892, Object(WP_Post), Object(WP_Post)) 7 /wp-includes/post.php(4853): wp_insert_post(Array, false, true) 8 /wp-content/themes/Divi/includes/builder/functions.php(2397): wp_update_post(Array) 9 /wp-includes/class-wp-hook.php(310): et_fb_ajax_save(”) 10 /wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(”, Array) 11 /wp-includes/plugin.php(517): WP_Hook->do_action(Array) 12 /wp-admin/admin-ajax.php(188): do_action(‘wp_ajax_et_fb_a…’) 13 {main}thrown in /wp-includes/blocks/footnotes.php on line 211
To fix this, change lines 103 and 104 of class.email-post-changes.php to read:
$left = apply_filters( "wp_post_revision_field$field", $this->left_post->$field, $field, $this->left_post, 'from' );
$right = apply_filters( "wp_post_revision_field$field", $this->right_post->$field, $field, $this->right_post, 'to' );Yeah, I found that solution. You can also check it on https://tinyurl.com/4yyuuhc8
- This reply was modified 1 year, 3 months ago by whanklee.
Hello,
We’re using WordPress 6.3 with this plugin on version 1.7.1 installed by composer. This thread has the status resolved.We still receive the error below while it’s said it’s already fixed?
[24-Aug-2023 13:27:15 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function wp_get_footnotes_from_revision(), 2 passed in /wp-includes/class-wp-hook.php on line 310 and exactly 3 expected in /wp-includes/blocks/footnotes.php:211 Stack trace: #0 /wp-includes/class-wp-hook.php(310): wp_get_footnotes_from_revision() #1 /wp-includes/plugin.php(205): WP_Hook->apply_filters() #2 /wp-content/plugins/email-post-changes/class.email-post-changes.php(103): apply_filters() #3 /wp-includes/class-wp-hook.php(310): Email_Post_Changes->post_updated() #4 /wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #5 /wp-includes/plugin.php(517): WP_Hook->do_action() #6 /wp-includes/post.php(4720): do_action() #7 /wp-includes/post.php(4853): wp_insert_post() #8 /wp-admin/includes/post.php(445): wp_update_post() #9 /wp-admin/post.php(227): edit_post() #10 {main} thrown in /wp-includes/blocks/footnotes.php on line 211
The fix mentioned above (https://plugins.trac.www.ads-software.com/changeset/2946355/ ) isn’t applied in 1.7.1 ?
Maybe change it to the following:
$html_diffs = array(); $text_diffs = array(); $identical = true; $version_compare = version_compare( get_bloginfo( 'version' ), '6.3.0', '>=' ); foreach ( _wp_post_revision_fields() as $field => $field_title ) { if ( $version_compare ) { $left = apply_filters( "_wp_post_revision_field_$field", $this->left_post->$field, $field, $this->left_post, 'from' ); $right = apply_filters( "_wp_post_revision_field_$field", $this->right_post->$field, $field, $this->right_post, 'to' ); } else { $left = apply_filters( "_wp_post_revision_field_$field", $this->left_post->$field, $field ); $right = apply_filters( "_wp_post_revision_field_$field", $this->right_post->$field, $field ); } if ( !$diff = $this->wp_text_diff( $left, $right ) ) continue; $html_diffs[$field_title] = $diff; $left = normalize_whitespace( $left ); $right = normalize_whitespace( $right ); $left_lines = explode( "\n", $left ); $right_lines = explode( "\n", $right ); require_once( dirname( __FILE__ ) . '/unified.php' ); $text_diff = new Text_Diff( $left_lines, $right_lines ); $renderer = new Text_Diff_Renderer_unified(); $text_diffs[$field_title] = $renderer->render($text_diff); $identical = false; }
- This reply was modified 1 year, 3 months ago by Paul. Reason: added suggestion
No one said new update was released. You have to fix it manually. I shared a link where to find a solution for this issue. You should edit that php file.
Hi @whanklee , My previous comment was for the plugin creator.
We’re installing the plugin by composer ( https://wpackagist.org/search?q=email-post-changes ). The moment someone in our organisation types
composer update
the manually added fix is gone. Therefore I suggested your fix with an extra check.
- The topic ‘WordPres 6.3 issue’ is closed to new replies.