Quantcast
Channel: Active questions tagged yoast - Stack Overflow
Viewing all articles
Browse latest Browse all 97

Wordpress: Fatal error: Trait "YoastSEO_Vendor\Psr\Log\LoggerTrait" not found

$
0
0

I was trying to restore the backup blog, but when I restored, this message appeared when I tried to access any page, including admin.

Wordpress version: 6.3.1

PHP version: 7.3.33

Fatal error: Trait 'YoastSEO_Vendor\Psr\Log\LoggerTrait' not found in /wp-content/plugins/wordpress-seo/src/loggers/logger.php on line 14

logger.php->line 14:

use LoggerTrait;

the complete logger.php file:

<?phpnamespace Yoast\WP\SEO\Loggers;use YoastSEO_Vendor\Psr\Log\LoggerInterface;use YoastSEO_Vendor\Psr\Log\LoggerTrait;use YoastSEO_Vendor\Psr\Log\NullLogger;/** * Our logger class. */class Logger implements LoggerInterface {    use LoggerTrait;    /**     * The logger object.     *     * @var LoggerInterface     */    protected $wrapped_logger;    /**     * Logger constructor.     */    public function __construct() {        $this->wrapped_logger = new NullLogger();        /**         * Gives the possibility to set override the logger interface.         *         * @api \YoastSEO_Vendor\Psr\Log\LoggerInterface $logger Instance of NullLogger.         *         * @return LoggerInterface The logger object.         */        $this->wrapped_logger = \apply_filters( 'wpseo_logger', $this->wrapped_logger );    }    /**     * Logs with an arbitrary level.     *     * @param mixed  $level   The log level.     * @param string $message The log message.     * @param array  $context The log context.     *     * @return void     */    public function log( $level, $message, array $context = [] ) {        $this->wrapped_logger->log( $level, $message, $context );    }}

I don't understand what happened because it was working normally before restoring the backup


Viewing all articles
Browse latest Browse all 97

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>