Open hirasso opened 1 year ago
@herrvigg did you ever come around to having a look at this?
For the time being, I can use --skip-plugins
to exclude qTranslate-XT.
Instead of this:
wp transient delete --all
I have to do this:
wp --skip-plugins="qtranslate-xt" transient delete --all
But it would be very nice to have it just fixed in qtranslate-xt, as stated above.
I don't see how #1387 would solve this.
In qtranxf_get_front_page_config
line 24 can you add this?
var_dump($q_config['url_info']);
It seems $q_config['url_info']['wp-path']
is not set (null). The other fields may give some indications.
Could be some special WP installation that is not supported in some script.
I'll post the var dump tomorrow. I'm indeed using a custom directory structure as described in https://github.com/qtranslate/qtranslate-xt/pull/1387#issuecomment-1890916854 (Test 3)
@herrvigg This is the requested dump:
array(10) {
["cookie_front_or_admin_found"]=>
bool(false)
["pagenow"]=>
string(9) "index.php"
["REQUEST_METHOD"]=>
string(3) "GET"
["scheme"]=>
string(4) "http"
["host"]=>
string(0) ""
["path"]=>
bool(false)
["path-base"]=>
string(5) "/core"
["doing_front_end"]=>
bool(true)
["language"]=>
string(2) "de"
["set_cookie"]=>
bool(true)
}
This is the directory structure I'm using:
.
├── content # wp content folder
│ ├── ...
├── core # wp core folder
│ ├── ...
├── index.php
└── wp-config.php
Describe the bug When running any WP_CLI command, qtranslate breaks with this message:
To Reproduce Steps to reproduce the behavior:
wp core update
Expected behavior The WordPress core should be updated
Debug info Go to
<YOUR_SITE>/wp-admin/options-general.php?page=qtranslate-xt#troubleshooting
. PressCollect information
button and copy/paste the output below.Proposed Solution I was able to mute the error by bailing early if WP_CLI is defined:
I don't know if this has any downsides, but it worked for me.