• Hi

    When accessing the Dashboard I get this Fatal Error message: Fatal error: Uncaught Error: Cannot access offset of type string on string in /www/wp-admin/includes/dashboard.php on line 31

    I have checked the debug.log file and it shows this:

    [15-Feb-2024 08:25:37 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783
    [15-Feb-2024 08:25:38 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /srv/www/dominio.org/www/wp-admin/includes/dashboard.php:31
    Stack trace: 0 /srv/www/dominio.org/www/wp-admin/index.php(15): wp_dashboard_setup() 1 {main}

    thrown in /srv/www/dominio.org/www/wp-admin/includes/dashboard.php on line 31

    WordPress version 6.4.3
    Current theme: Generatepress Child (version 1.0) / Generatepress (Version 3.4.0)
    PHP version 8.0.30

    Help me, please!

    Best regards

Viewing 9 replies - 1 through 9 (of 9 total)
  • Deactivate all plugins as a test. You should be able to access them via /wp-admin/plugins.php. If the dashboard then no longer displays an error, one of the plugins is to blame.

    You could also change the theme to a standard theme to rule out yours as the cause.

    Thread Starter Cris

    (@crispaor)

    I disabled everything with the “Health Check & Troubleshooting” plugin to check it and it also gives an error when entering the Dashboard:

    [16-Feb-2024 09:00:46 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783
    [16-Feb-2024 09:00:49 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /srv/www/dominio.org/www/wp-admin/includes/dashboard.php:31
    Stack trace: 0 /srv/www/dominio.org/www/wp-admin/index.php(15): wp_dashboard_setup() 1 {main}

    thrown in /srv/www/dominio.org/www/wp-admin/includes/dashboard.php on line 31
    [16-Feb-2024 09:00:52 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783

    Something is trying to load a Spanish language file with an incorrect path. Could also come from the theme. Have you changed that too?

    Thread Starter Cris

    (@crispaor)

    I have deactivated all the plugins and activated the “Twenty Twenty-Two” theme and, even so, it still gives a fatal error when entering the Dashboard.

    [18-Feb-2024 13:40:11 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /srv/www/dominio.org/www/wp-admin/includes/dashboard.php:31Stack trace:#0 /srv/www/dominio.org/www/wp-admin/index.php(15): wp_dashboard_setup()#1 {main} thrown in /srv/www/dominio.org/www/wp-admin/includes/dashboard.php on line 31[18-Feb-2024 13:40:16 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/cideal.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783

    Thread Starter Cris

    (@crispaor)

    If I activate plugins and leave my theme, when I go to the Dashboard, “Query Monitor” plugin shows the following message:

    Fatal error: Uncaught Error: Cannot access offset of type string on string
    in /srv/www/dominio.org/www/wp-admin/includes/dashboard.php on line 31

    Call stack:

    1. wp_dashboard_setup()
      wp-admin/index.php:15
    Query Monitor

    This line is related to the browser check. Have you tried it with a different browser?

    If it works with another browser, the problem is related to the actual browser. Add-ons in this browser could be the cause.

    If it doesn’t work with the other browser either, then a value has crept into the database that is unfavourable – probably due to some previous operation or a plugin. In this case, I would recommend removing all transients from the database. How to do this is described here: https://www.wpbeginner.com/plugins/how-to-manage-and-delete-transients-in-wordpress/

    Thread Starter Cris

    (@crispaor)

    In other browsers, it opens the Dashboard but still logs errors:

    [19-Feb-2024 07:53:27 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783
    [19-Feb-2024 07:53:29 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783
    [19-Feb-2024 07:53:33 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783
    [19-Feb-2024 07:53:37 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-content/plugins/query-monitor/collectors/languages.php on line 170
    [19-Feb-2024 07:53:37 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783
    [19-Feb-2024 07:53:40 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(/languages/cmb2-es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-content/plugins/query-monitor/collectors/languages.php on line 170
    [19-Feb-2024 07:53:40 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages/cmb2-es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783
    [19-Feb-2024 07:53:44 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783
    [19-Feb-2024 07:53:47 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-content/plugins/query-monitor/collectors/languages.php on line 170
    [19-Feb-2024 07:53:47 UTC] PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages//es_ES.mo) is not within the allowed path(s): (/srv/www/dominio.org/:/srv/www/dominio.org/www:.:/srv/www/dominio.org/.tmp:/tmp/:/opt/php-8.0/share/php:/dev/urandom) in /srv/www/dominio.org/www/wp-includes/l10n.php on line 783

    In Firefox (where it doesn’t show the Dashboard) it still gives Fatal error, even after removing all the add-ons.

    Unfortunately, we hardly get any further that way. The message is the same as a few days ago when it was about an incorrect path to language files. I see 2 possibilities for you:

    a) You reinstall the entire project. If necessary, you can also use an older backup for this.
    b) You look for someone who can take a look at it personally. You can find someone like that here, for example: https://jobs.wordpress.net/

    Thread Starter Cris

    (@crispaor)

    Okay, thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Fatal Error: dashboard’ is closed to new replies.