Closed kodie closed 2 months ago
Something to add here. I found that adding "psr/log": "^2"
to the composer dependencies fixes the issue, but then the plugin has some notices about it running in "PSR-3 v1 compatibility mode".
Hello @kodie ! Could you confirm it's on a fresh install of WordPress you have such an error. How do you have a composer.json ?
Yes, fresh install where DecaLog is the only plugin active.
composer.json looks something like this:
{
"name": "kodie/new-project",
"repositories":[
{
"type": "composer",
"url": "https://wpackagist.org"
}
],
"config": {
"allow-plugins": {
"composer/installers": true,
"johnpbloch/wordpress-core-installer": true
}
},
"extra": {
"wordpress-install-dir": "wordpress",
"installer-paths": {
"content/plugins/{$name}/": ["type:wordpress-plugin"]
}
},
"require": {
"php": ">=8.1",
"johnpbloch/wordpress": "6.5.4",
"wpackagist-plugin/decalog": "4.2.0",
"psr/log": "^2"
},
"require-dev": {
"itsahappymedium/fec": "0.2.2",
"itsahappymedium/gpm": "0.1.1",
"itsahappymedium/wp-deployer": "0.4.1"
}
}
OK. So it's normal. If you install WP with wpackagist/composer its behavior is different. Definitely not a "vanilla" WordPress. If you chose to install it like that, and in order to not change your composer.json (please, please don't use PSR-3 v2), you have to follow this to force PSR-3 v3.
Can confirm that adding define('DECALOG_PSR_LOG_VERSION', 'AUTO');
to wp-config.php fixed the issue for me! Thank you!
Describe the bug Installing DecaLog on a fresh WordPress install with no other plugins activated throws the following errors and basically stops the entire site from working with the classic "There has been a critical error on this website. Learn more about troubleshooting WordPress" message. It does appear that it creates a
mu-plugins
directory with a_decalog_loader.php
file in it as well as afatal-error-handler.php
file in the content directory.Errors:
To Reproduce
Environment (please complete the following information):
Additional context Our WordPress environment is slightly unique I guess in the sense that we are running it inside of a docker container, install WordPress core and plugins via Composer, our WP core is installed to it's own directory ("wordpress"), and our wp-content directory is just called "content".
Example: