• Hello.
    I took over an old webpage for a hotel yesterday and when trying to edit the following warning comes up. I suspect that the website might be to old but does anyone know what the problem is and what do I need to do?

    Warning: Array to string conversion in /customers/7/2/a/ornviken.se/httpd.www/wp-includes/block-editor.php on line 340 Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /customers/7/2/a/ornviken.se/httpd.www/wp-includes/class.wp-dependencies.php:186 Stack trace: #0 /customers/7/2/a/ornviken.se/httpd.www/wp-includes/class.wp-dependencies.php(186): explode(‘?’, Array) #1 /customers/7/2/a/ornviken.se/httpd.www/wp-includes/class.wp-styles.php(371): WP_Dependencies->all_deps(Array, false, false) #2 /customers/7/2/a/ornviken.se/httpd.www/wp-includes/class.wp-dependencies.php(126): WP_Styles->all_deps(Array) #3 /customers/7/2/a/ornviken.se/httpd.www/wp-includes/block-editor.php(347): WP_Dependencies->do_items(Array) #4 /customers/7/2/a/ornviken.se/httpd.www/wp-includes/block-editor.php(479): _wp_get_iframed_editor_assets() #5 /customers/7/2/a/ornviken.se/httpd.www/wp-admin/edit-form-blocks.php(282): get_block_editor_settings(Array, Object(WP_Block_Editor_Context)) #6 /customers/7/2/a/ornviken.se/httpd.www/wp-admin/post.php(187): require(‘/customers/7/2/…’) #7 {main} thrown in /customers/7/2/a/ornviken.se/httpd.www/wp-includes/class.wp-dependencies.php on line 186
    Ett kritiskt fel har uppst?tt p? webbplatsen. Kolla e-posten till webbplatsens administrationsadress f?r vidare instruktioner.

    L?s mer om fels?kning i WordPress.

    • This topic was modified 2 years, 6 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    notices and warnings not errors.

    A production site should be set to not display warnings and notices.

    Notices and Warnings are to help developers clean up code issues e.g. the Notice might be that a function is deprecated in a future release. Or a Warning may be that a variable has not been set before being used.

    In general – on a production site – you should have Notices and Warning set not to display.

    This is easy to do, you can edit your wp-config.php file and set

    ini_set('display_errors','Off');
    ini_set('error_reporting', E_ALL );
    define('WP_DEBUG', false);
    define('WP_DEBUG_DISPLAY', false);

    Or if that is too technical – just raise a support ticket to your host to ask them to suppress PHP Notices and Warnings.

    But yes, old versions of themes / plugins being used with the most recent WP is likely to be the cause

    Firstly, do some backup, you should prioritize that because it used to save lives most of time. Backup’s always important before any manutention processs like upgrading your WP install, themes, and plugins.

    Whether something goes wrong you’ll can roll back any changes.

    Always is good to be careful to avoid any headache with hassle.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Warning message when trying to edit in WordPress’ is closed to new replies.