Support » Everything else WordPress » WordPress 5.6 Upgrading Issue
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 1 year, 5 months ago by
james0712.
The page I need help with: [log in to see the link]
-
This topic was modified 1 year, 5 months ago by
-
Never, never, never update wordpress, themes and plugins with new versions
Always wait for second or third update and check theme and plugin compatibility
I’ve been scalded too many timesWe can add
Gutenberg Post Blocks
to the list of plugins that causes this error.
Hello. My wordpress automatically updated to wordpress 5.6 and my website is not working after that. From the home page- I click on the menu to go to any of the other webpages- the webpage turns black. HELP!!!
As noted by @jimbo777, the fix posted by @mdashik198 will work if you change the quotes.
Using a file manager to get to your WP files, go to this folder: \wp-includes\rest-api and first download/create a backup of class-wp-rest-server.php
Then go to the original file to edit it. Go to line 1402.
Replace this line: $arg_data = array_intersect_key( $opts, $allowed_schema_keywords );
With this line: $arg_data = array_intersect_key( [‘$opts’], [‘$allowed_schema_keywords’] );
@mdashik198, many thanks for the quick fix. Was working for me.
Hiya all,
I see there’s been a recommendation to fix this by editing WordPress’ core files.
I want to make it very clear that any changes made like this will be overwritten by any updates. If you have security plugins installed you may also start getting alerts about modifications made to files on your server. And it may have unexpected consequences to other parts of WordPress.
As such, we do not recommend doing this under any circumstance, unless there is an associated path from the WordPress project planned for an upcoming release which can be applied manually.
The ticket for this can be seen at https://core.trac.wordpress.org/ticket/51986, and when it is closed as fixed, the associated patch at that time is considered safe to use, although you manually patch files at your own expense.
—
With that out of the way, the reason for these errors stem from plugins or themes registering their REST API endpoints the wrong way, they would not have been working optimally before this either, but there was nothing making this visible.
You are encouraged to reach out to plugin and theme developers where you see issues like this, and asking them to update their code to follow the standards and data formats expected to be used. This will ensure that WordPress keeps working as expected, and other plugins and themes are not negatively impacted by someone doing something wrong 🙂
Buonasera anche io ho lo stesso problema
Warning: array_intersect_key0: Expected parameter 1 to be
an array, string given in
/web/htdocs/www.segnatiilmioblog.it/home/wp-
includes/rest-api/class-wp-rest-server.php on line 1402Uso chrome da mobile e ho il problema quando creo una nuova pagina.
Tutti i plugin sono aggiornati e anche i temi.
L’ultimo installato proprio prima dell’aggiornamento era simple ahutor box quindi ho provato a disattivarlo per vedere se era lui ma fa ancora il problema.Ho tema blocksy
I plug-in sono:
404 to 301 – Redirect, Log and Notify 404 Errors
Advanced Editor Tools (previously TinyMCE Advanced)
Akysmet antispam
AMP
Blocksy compaion
Christmas panda
Contact form 7
Comment guestbook
Google site kit
Genesis block
Gutemberg post block
Jetpack
Pluginops landing page
Post inviati dall’utente
Yoast seo
Wp fastest cache
Redirection
Simile ahutor box
WordPress Users & WooCommerce Customers Import Export(BASIC)
WP Google My Business Auto Publish
WP Like button
Wp ultimate recipeBuonasera anche io ho lo stesso problema
Avvertenza: array_intersect_key0: parametro previsto 1 come
array, stringa fornita in
/web/htdocs/www.segnatiilmioblog.it/home/wp-
includes / rest-api / class-wp-rest-server.php alla riga 1402Uso chrome da mobile e ho il problema quando creo una nuova pagina.
Tutti i plugin sono aggiornati e anche i temi.
L’ultimo installato proprio prima dell’allestimento era simple ahutor box quindi ho provato un disattivarlo per vedere se era lui ma fa ancora il problema.Ho tema blocky
I plug-in sono: da
404 a 301 – Reindirizza, registra e notifica errori 404
Advanced Editor Tools (in precedenza TinyMCE Advanced)
Akysmet antispam
AMP
Blocksy compaion
Christmas panda
Modulo di contatto 7
Commento guestbook
Google site kit
Genesis block
Gutemberg post block
Jetpack
Pluginops landing page
Post utilizzato Yoast
seo
Wp Cache più veloce
Reindirizzamento
Simile a box Autori
Utenti WordPress e clienti WooCommerce Import Export (BASIC)
WP Google My Business Auto Publish
WP Pulsante Mi piace
Wp ricetta definitivaAvevo aggiornato tutti i plugin tranne Gutemberg post block, poi ho aggiornato anche lui e ho eliminato due plugin che avevo già disattivato in precedenza. Adesso non fa più quel problema.
In editing posts/pages, the new parent page dropdown shows ampersands as &
For example “Black & White”.
Seems a bit sloppy.Hi there @desrosj
I tried deactivating and reactivating my plugins but, it did not fix the problem. I’m still getting
Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in /home/customer/www/esculenteats.com/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1411. Thats the line:
if ( isset( $callback[‘args’] ) ) {
$endpoint_data[‘args’] = array();foreach ( $callback[‘args’] as $key => $opts ) {
$arg_data = array_intersect_key( $opts, $allowed_schema_keywords );
$arg_data[‘required’] = ! empty( $opts[‘required’] );$endpoint_data[‘args’][ $key ] = $arg_data;
}
}`Please HELP!
- The topic ‘WordPress 5.6 Upgrading Issue’ is closed to new replies.