-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected HTML output when updating WordPress #191
Comments
Please link the ticket here when you open it. |
@rodrigoprimo Can you provide a reproducible test case for this? I'm not sure whether it's still a bug, as I can't reproduce locally. |
@danielbachhuber I'm not able to reproduce this anymore so I guess it was fixed somehow. Closing the issue. Thanks. |
@rodrigoprimo 👍 thanks |
I got similar output when I upgraded from 4.5.3 to 4.6. I ignored it thinking some language update issue. Hindi language was activated in my system. May be it appears in update in language other than default English. |
@ernilambar I was testing with Brazilian Portuguese activated on my WP. Are you able to reproduce this issue again? Maybe it is necessary to make sure translation files are outdated and that is what I missed last time I tried to reproduce it? |
Steps to reproduce.
|
@ernilambar thanks for taking the time to test this. I wasn't able to reproduce the same behavior. Which version of WP-CLI are you running? I just tested with the latest version from the master branch. Here is what I did:
Are you running the same commands and getting the HTML output? |
Ahh, I had tested in existing WordPress setup. But now I checked again and there is no such output. I am not sure what happening actually 😁 |
@ernilambar maybe there was an language update available when you first tested? Do you happen to know how to downgrade a language package so that we can test what happens when we run the commands above with an outdated language package? Thanks for your help! |
@rodrigoprimo @ernilambar Is this a core bug, or a WP-CLI bug? |
It used to be a core bug but I'm not sure anymore since now I can't reproduce it 😄 |
I saw such output once. I tried but could not specifically reproduce it again. |
Ok. If someone can reproduce this with specific steps and identify where the bug is with WP-CLI, then we can get it fixed. |
I am able to reproduce this still with 5.1.0 -> 5.1.1 upgrade. See https://core.trac.wordpress.org/ticket/30497#comment:4 |
Just happened to me today with A workaround could be to disable async translation updates using |
Fwiw: This is already the case for plugins/themes: https://github.com/wp-cli/extension-command/blob/fba4b2c/src/WP_CLI/CommandWithUpgrade.php#L20-L23 |
Yes, the behavior for core should be updated to match the one we currently have for plugins/themes. |
It happened to me today. |
Following error occurred when the task was run via CRON - I'm not sure whether this is the same issue or not.
|
@markhowellsmead Witch WP-CLI and WordPress version are you using? |
@markhowellsmead You have to update WP-CLI to 2.4.0, see wp-cli/wp-cli#5283. |
I'm still wrapping my head around a fix, but before my focus time on open-source is up, I wanted to share a more reliable reproduction using the
|
The fix was mentioned in the discussion above already. We need to add something like the following to // Do not automatically check translations updates after updating plugins/themes.
add_action( 'upgrader_process_complete', function() {
remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
}, 1 ); |
If I update WP using
wp core update
I get a lot of unexpected HTML output coming from WordPress itself:This output is coming from the new WP code to automatically update translations when updating core.
It seems that WP_CLI\UpgraderSkin is not being used in this context because the static method Language_Pack_Upgrader::async_upgrade() instantiate Language_Pack_Upgrader class with a hard coded skin. I guess we will have to open a new ticket on core. I decided to open an issue here first in case anyone has another idea on how to fix this.
The text was updated successfully, but these errors were encountered: