WordPress 5.6 Upgrading Issue
-
Just now I upgraded it to the new version 5.6, but a big problem happens when I try to create a new post, it showed me below error:
Warning: array_intersect_key(): Argument #1 is not an array in /home/healthca/public_html/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1402
No error info showed for other places, it just showed when I create/edit posts or pages!
Any one can help me please?
- This topic was modified 3 years, 11 months ago by james0712.
The page I need help with: [log in to see the link]
-
Hi @james0712,
Can you drop a list of plugins that you are running on your site?
If you are able to, would it be possible to disable plugins one by one to see if the issue is being caused by a specific plugin? Using a staging environment for this would be best.
HI @desrosj
HERE IS THE LIST OF THE PLUGINS:
Activity Log
Advanced Ads
Advanced noCaptcha & invisible Captcha
All In One SEO Pack
Broken Link Checker
Classic Editor
Content Aware Sidebars
Contextual Related Posts
Counter Number Showcase
Elementor
Google Analytics Dashboard for WP (GADWP)
LuckyWP Table of Contents
MC4WP: Mailchimp for WordPress
Meta Generator and Version Info Remover
Post Views Counter
Pretty Links
PublishPress Capabilities
Read Meter – Reading Time & Progress Bar for WordPress.
Responsive Accordion And Collapse
Social Media and Share Icons (Ultimate Social Media)
ThemeGrill Demo Importer
Trustpilot-reviews
UpdraftPlus – Backup/Restore
WP Coupons and Deals
WP Table Builder
WP User Avatar
wpDiscuzHI @desrosj
disabled Google Analytics Dashboard for WP (GADWP) the error info disappeard, but the problem did not fix. see my screenshot.
https://www.healthcabin.net/blog/wp-content/uploads/2020/12/20201209105347700.png
————–
Update:
Changed the browser to Google chrome – – problem fixed
- This reply was modified 3 years, 11 months ago by james0712.
I Am Facing The same Problem. I Am using Google chrome. Deactivate All Plugin And Active Only Redux, Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in /home/themebiz/public_html/demo/woolooks/electronics/wp-includes/rest-api/class-wp-rest-server.php on line 1402 This error come. Any Help.
I dont know, I disabled all plugins which relate to Google. Then it works…
When I try to add another different plugin related to Google, it appears again…
I have the same issue, among my active plugins is redux, and quite a long list of custom plugins.
Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in /wp-includes/rest-api/class-wp-rest-server.php on line 1402
Call Stack
# Time Memory Function Location
1 0.0109 488824 {main}( ) …/post.php:0
2 3.6107 69597144 require( ‘/wp-admin/edit-form-blocks.php’ ) …/post.php:187
3 3.6108 69600920 array_reduce ( ) …/edit-form-blocks.php:82
4 3.6108 69600920 rest_preload_api_request( ) …/edit-form-blocks.php:82
5 3.6108 69601520 rest_do_request( ) …/rest-api.php:2520
6 3.6820 71674264 WP_REST_Server->dispatch( ) …/rest-api.php:479
7 3.6858 71732896 WP_REST_Server->respond_to_request( ) …/class-wp-rest-server.php:1007
8 3.6858 71732896 WP_REST_Server->get_index( ) …/class-wp-rest-server.php:1160
9 3.6900 72029472 WP_REST_Server->get_data_for_routes( ) …/class-wp-rest-server.php:1243
10 3.6909 72042136 WP_REST_Server->get_data_for_route( ) …/class-wp-rest-server.php:1324
11 3.7373 72049584 array_intersect_key ( ) …/class-wp-rest-server.php:1402For testing I edited the code of class-wp-rest-server.php to:
foreach ( $callback[‘args’] as $key => $opts ) {
if ( ! is_array( $opts ) ) {print_r( $callback[‘args’] );
echo “\n”;
print_r( $opts );
echo “\n\n”;
}
$arg_data = @array_intersect_key( $opts, $allowed_schema_keywords );
$arg_data[‘required’] = ! empty( $opts[‘required’] );$endpoint_data[‘args’][ $key ] = $arg_data;
}For more see: https://core.trac.www.ads-software.com/ticket/51986#comment:2
- This reply was modified 3 years, 11 months ago by Christoph Daum. Reason: Added xdebug message
- This reply was modified 3 years, 11 months ago by Christoph Daum. Reason: added more debug information
- This reply was modified 3 years, 11 months ago by Christoph Daum. Reason: Added link to trac
I just upgraded and have the same problem:
Expected parameter 1 to be an array, string given in …/wp-includes/rest-api/class-wp-rest-server.php on line 1402
Hi. Same issue here. Initially some content of some pages was disappearing, but after I opened the pages and save it again with Elementor, content was visible again. Anyway, I have same error related to class-wp-rest-server.php on line 1402. Hope it will be fixed soon.
Fixed after disabling, Google Analytics for WordPress by MonsterInsights
Have the same problem after upgrade((
many times says to myself – don’t upgrade strait, wait for testing…here my plugins… no google
Redux
Silent Salesman
BBSpoiler
Contact Form 7
Electro Extensions
Envato Market
Invisible reCaptcha
Loco Translate
Post Tabs
Regenerate Thumbnails
Slider Revolution
RusToLat
Saphali Woocommerce Сбербанк РФ
Search By SKU – for Woocommerce
Сортировка категорий и таксономия(иерархия) элементов от Nsp-Code – 1.5.7.3
Tabs – Responsive Tabs with WooCommerce Product Tab Extension
VK Comments
CDEK WooCommerce Shipping Method
WooCommerce Product Add-ons
WooCommerce Variation Swatches and Photos
WooCommerce
WP Mail SMTP Plugin by Mail Bank
WP Maintenance Mode
WP-Optimize – Clean, Compress, Cache
YITH WooCommerce WishlistPS. tryed to disable plugins. Redux gives this error
Electro theme works on Redux(((Hurrah I have fix this error!
Go to this file:- Xampp\htdocs\wpdemo\wp-includes\rest-api\ and open class-wp-rest-server.php file, now scroll down and find the line 1402.pasts this writing on the line 1402:- $arg_data = array_intersect_key( [‘$opts’], [‘$allowed_schema_keywords’] );
Check Screenshot:-
https://ibb.co/bNpbLNF- This reply was modified 3 years, 11 months ago by mdashik198.
- This reply was modified 3 years, 11 months ago by mdashik198.
- This reply was modified 3 years, 11 months ago by mdashik198.
Hi everybody,
Redux work on it !
https://www.ads-software.com/support/topic/reduxtemplates-api-bug-in-gutenberg-editor-in-wp-5-6/
Same problem here, on Chrome and on Safari.
Plugins include:AJAX Hits Counter + Popular Posts Widget
Akismet Anti-Spam
Anti-Malware Security and Brute-Force Firewall
Catch IDs
Classic Editor
CMS Tree Page View
Column Shortcodes
downML – Download Media Library
Duplicate Page
Email Address Encoder
Enable Media Replace
Featured Image Admin Thumb
Google Analytics for WordPress by MonsterInsights
Jetpack by WordPress.com
Newsletter
Ninja Forms
P3 (Plugin Performance Profiler)
Page Links To
PDF Embedder
Popup Maker
Post Expirator
Post Types Order
PublishPress Blocks
Redux
SG Optimizer
Shortcodes Ultimate
Smart Slider 3
Sucuri Security – Auditing, Malware Scanner and Hardening
The Post Grid
Title Remover
Ultimeter – the Ultimate Progress and Goals Meter
WordPress Carousel
WordPress Importer
WP Migrate DB
WPForms LiteI deactivated this plugin Google Analytics for WordPress by MonsterInsights and problem disappears
Your suggested fix is causing:
[10-Dec-2020 10:18:26 UTC] PHP Parse error: syntax error, unexpected ‘$opts’’ (T_VARIABLE), expecting ‘]’ in /var/www/web25284762/html/wp-includes/rest-api/class-wp-rest-server.php on line 1402
Edit: I think this is because of the quotes you used such as ’. I have now changed these to single quotes such as ‘ . I think that may have done the trick
- This reply was modified 3 years, 11 months ago by jimbo777.
- The topic ‘WordPress 5.6 Upgrading Issue’ is closed to new replies.