php-error body class in admin after updated wordpress 5.6.2 to 5.7 via docker pull wordpress

Viewed 571

This is such a strange problem.

I have updated from wordpress 5.6.2 to 5.7 using docker compose for my local environment by...

  1. docker-compose down - to stop and remove current running environment
  2. docker pull wordpress - to pull the latest 5.7 image from docker hub
  3. docker-compose up -d - to rebuild the environment using my existing persistent data.

The update seemed to go well, logged into the admin dashboard, and the update was running.

But I noticed this strange white gap like there was an error but no printed error.

One of my projects regular wp installation...

enter image description here

And same problem on another of my projects but running in multisite mode...

enter image description here


This white space below the #wpadminbar is caused by php-error class in the body tag in the admin dashboard...

enter image description here

But there is no error outputted. Why could this be and how can I debug the error if no error is displayed?

Unfortunately I've had roll back to the previous wordpress image 5.6.2 changing this in my yml...

  # here is out wordpress container
  wordpress:
    depends_on:
      - db
    image: wordpress:5.6.2
    volumes:

And then the non existent php-error admin body class goes away.


I've tried viewing error logs using...

WORDPRESS_CONFIG_EXTRA: |

  define('WP_DEBUG', true);
  define('WP_DEBUG_LOG', true);

And then dockering up, and running the site admin to fire the error, then checking wp-content for the error log...

joshmoto@Joshs-iMac thesweetpeople % docker-compose exec wordpress /bin/sh
# ls
index.php    wp-activate.php     wp-comments-post.php  wp-config.php  wp-includes        wp-login.php     wp-signup.php       xmlrpc.php
license.txt  wp-admin            wp-config-docker.php  wp-content     wp-links-opml.php  wp-mail.php      wp-site-switch.php
readme.html  wp-blog-header.php  wp-config-sample.php  wp-cron.php    wp-load.php        wp-settings.php  wp-trackback.php
# cd wp-content 
# ls
cache  index.php  mu-plugins  plugins  themes  uploads
# 

As you can see no error log is being created.


I'm outputting logs now successfully but persistent mapping logs to my project using error-logging.ini...

      - ./logs:/var/www/html/wp-content/logs
      - ./error-logging.ini:/usr/local/etc/php/conf.d/error-logging.ini 
log_errors = On
error_log = /var/www/html/wp-content/logs/debug.log

I've actually tested this by creating errors and running them, logs are working. But there is no log for this issue.

1 Answers

OK, finally figured it out the issue, I think. Now error is gone now and I have 5.7 running error free.

First I went to the docker mac app, went to images, click the 3-dot dropdown on wordpress latest image (5.7) and pulled the latest updates for the image. This may have fixed it, not sure.

I was also defining define('WP_DEBUG', true); in extra configs and defining WORDPRESS_DEGUG: 1 in environment:.

Which may have cause the error because WP_DEBUG was being defined twice.

These two changes seem to have fixed the issue.

Related