Opened 5 months ago
Last modified 3 months ago
#65429 new defect (bug)
_site_transient_update_themes not cleared after successful translation update
| Reported by: | psmits1567 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | I18N | Version: | 7.0 |
| Severity: | major | Keywords: | |
| Cc: | Focuses: |
Description
Version: 7.0
Component: Upgrade/Install
Description: After updating theme translations, the translations array in _site_transient_update_themes is not cleared, causing the same update to reappear indefinitely. Deleting the transient manually resolves it temporarily.
This is also happening for plugins!
Solution temporarely clearing this record, then perform update again and refresh the screen
DELETE FROM psmitsoptions
WHERE option_name = '_site_transient_update_themes';
Attachments (1)
Change History (15)
#1
@
5 months ago
- Keywords has-patch added
Attached a patch that clears the relevant update transients after successful translation updates.
The patch tracks the translation types processed during Language_Pack_Upgrader::bulk_upgrade() and deletes the corresponding update transient (update_themes, update_plugins, or update_core) when clear_update_cache is disabled.
This prevents stale update data from persisting after translation updates and resolves the issue where completed translation updates may continue to be offered.
Testing:
- Reproduced the issue with a theme translation update.
- Confirmed that the
update_themestransient is cleared after a successful translation update. - Confirmed that the translation update is no longer repeatedly offered.
#2
@
5 months ago
- Keywords has-patch removed
I reported this to the nl_NL polyglots team to see if others were having this issue and we did a lot of debugging already, so Peter decided to create this ticket.
After updating the translations, you go back to Dashboard - Updates and they are available again. They are installed correctly
Deleting the _site_transient_update_themes option didn't work at first and it was recreated again with the same content (only a bit more recent timestamp):
O:8:"stdClass":5:{s:12:"last_checked";i:1780753484;s:7:"checked";a:2:{s:5:"astra";s:6:"4.13.4";s:15:"twentytwentyone";s:3:"2.8";}s:8:"response";a:0:{}s:9:"no_update";a:2:{s:5:"astra";a:6:{s:5:"theme";s:5:"astra";s:11:"new_version";s:6:"4.13.4";s:3:"url";s:35:"https://wordpress.org/themes/astra/";s:7:"package";s:54:"https://downloads.wordpress.org/theme/astra.4.13.4.zip";s:8:"requires";s:3:"5.3";s:12:"requires_php";s:3:"5.3";}s:15:"twentytwentyone";a:6:{s:5:"theme";s:15:"twentytwentyone";s:11:"new_version";s:3:"2.8";s:3:"url";s:45:"https://wordpress.org/themes/twentytwentyone/";s:7:"package";s:61:"https://downloads.wordpress.org/theme/twentytwentyone.2.8.zip";s:8:"requires";s:3:"5.3";s:12:"requires_php";s:3:"5.6";}}s:12:"translations";a:1:{i:0;a:7:{s:4:"type";s:5:"theme";s:4:"slug";s:5:"astra";s:8:"language";s:5:"nl_NL";s:7:"version";s:6:"4.13.4";s:7:"updated";s:19:"2026-06-02 19:58:35";s:7:"package";s:72:"https://downloads.wordpress.org/translation/theme/astra/4.13.4/nl_NL.zip";s:10:"autoupdate";b:1;}}}
After deleting both _site_transient_update_themes and _site_transient_update_plugins I tried again and now it was working for Astra, but not for Essential Addons for Elementor, so it's only working partially and we're not sure if it's permanent.
The _site_transient_update_themes value changed to:
O:8:"stdClass":5:{s:12:"last_checked";i:1780759653;s:7:"checked";a:2:{s:5:"astra";s:6:"4.13.4";s:15:"twentytwentyone";s:3:"2.8";}s:8:"response";a:0:{}s:9:"no_update";a:2:{s:5:"astra";a:6:{s:5:"theme";s:5:"astra";s:11:"new_version";s:6:"4.13.4";s:3:"url";s:35:"https://wordpress.org/themes/astra/";s:7:"package";s:54:"https://downloads.wordpress.org/theme/astra.4.13.4.zip";s:8:"requires";s:3:"5.3";s:12:"requires_php";s:3:"5.3";}s:15:"twentytwentyone";a:6:{s:5:"theme";s:15:"twentytwentyone";s:11:"new_version";s:3:"2.8";s:3:"url";s:45:"https://wordpress.org/themes/twentytwentyone/";s:7:"package";s:61:"https://downloads.wordpress.org/theme/twentytwentyone.2.8.zip";s:8:"requires";s:3:"5.3";s:12:"requires_php";s:3:"5.6";}}s:12:"translations";a:0:{}}
I'm seeing this issue on about 50+ sites out of the 324 sites I manage. Various hosts/servers, various combinations of plugins/themes, but it's all sites using Astra, all sites using WPCode Lite, all sites using Essential Addons for Elementor, all sites using SEOPress, etc. Some sites might have 1 of these items, some have more, there's no real overlap we can find. Many translation updates are still working fine.
All the translations are nl_NL, but that's because most of my sites are. I don't know if it happens to other languages.
PHP is 8.4 on most sites, there are no errors during updates on screen, in the browser console or in the PHP error log. There's no caching involved.
I'm not sure if the supplied patch is correct, because it sounds like the transients are removed, while they are there for a reason.
#3
@
5 months ago
Removing the record was a solution to fix it immediately. Tested with Astra and reproduced. After removing the record and forcing an update the problem was gone. Of course this is just to help identifying the problem. I do not know the normal behavior of the update process. But in my opinion this record is no longer necessary after an update, because there are no more details to fetch until the author updates the project, which causes recreating this record. As not all projects have this problem, I suspect that this might also be a problem within the project update mechanisme. E.g. Astra must also check its update function
#4
@
5 months ago
- Component Text Changes → I18N
- Severity critical → major
Can confirm this happens on at least some of my sites, by inspecting an unusually large and growing number of transients. Still investigating.
#5
@
5 months ago
Confirming on another project/locale: Simple History (plugin), es_ES. Reproduces with the plugin deactivated, so it seems to be purely core + the api.wordpress.org response.
For this one, deleting the transient doesn't help — the offer is regenerated on the next wp_update_plugins(), which matches the Astra-fixed-but-not-Essential-Addons report. My guess is it comes down to a mismatch between the updated the translations API advertises and the PO-Revision-Date inside the package it links to. Compare a broken locale (es_ES) with a working one (sv_SE):
# es_ES — broken (advertised newer than shipped content → loops): curl -s 'https://api.wordpress.org/translations/plugins/1.0/?slug=simple-history&version=5.29.0' \ | jq -r '.translations[] | select(.language=="es_ES") | .updated' # => 2026-06-02 16:09:04 curl -s 'https://downloads.wordpress.org/translation/plugin/simple-history/5.29.0/es_ES.zip' \ | bsdtar -xOf - '*.po' | grep -a 'PO-Revision-Date' # => PO-Revision-Date: 2026-02-16 10:30:56+0000 ← older than advertised # sv_SE — ok (advertised == shipped → installs once, never re-offered): # advertised .updated = 2026-03-11 06:53:13 # package PO-Revision-Date = 2026-03-11 06:53:13 ← identical
Where advertised == PO-Revision-Date the update seems to reconcile and stop; where advertised stays ahead of the shipped content it doesn't. Only es_ES is affected for this plugin — all 19 other locales match like sv_SE above.
#6
@
5 months ago
@eskapism This is exactly what I suspected, but I didn't know how this worked yet. So we need to figure out why these dates don't match.
The only "workaround" that's actually working is not executed on every website, but by creating a newer translation update for that locale, because it will create new dates. The sites aren't broken, it's something in the update mechanism that's causing this.
This ticket was mentioned in Slack in #polyglots by psmits1567. View the logs.
5 months ago
#8
@
5 months ago
I'm currently having exactly the same problem with Permalink Manager Lite and nl_NL. Here, too, the dates provided by wordpress.org are different:
curl -s 'https://api.wordpress.org/translations/plugins/1.0/?slug=permalink-manager&version=2.5.3.4' | jq -r '.translations[] | select(.language=="nl_NL") | .updated' => 2026-06-04 11:30:49 curl -s 'https://downloads.wordpress.org/translation/plugin/permalink-manager/2.5.3.4/2.5.3.4.zip' | bsdtar -xOf - '*.po' | grep -a 'PO-Revision-Date' => 2026-05-06 20:41:49
By the way, this is happening to me with WordPress 6.9.4. I don't think a bug in the core is the cause here—it's more likely related to how the files are generated on wordpress.org.
#9
@
3 months ago
I dug into this and I think I have the mechanism, though there is one thing I need confirmed from the people seeing it.
wp_get_l10n_php_file_data() in wp-includes/l10n.php reads the headers out of a .l10n.php file with this map:
'PO-Revision-Date' => 'po-revision-date',
GlotPress writes that value into .l10n.php under translation-revision-date, not po-revision-date. The key core looks for is not in the file, so the function always returns an empty PO-Revision-Date. The value is present, just under the other name. From the packs being served for Simple History right now:
| locale | .l10n.php translation-revision-date | .po PO-Revision-Date
|
| es_ES | 2026-06-26 08:56:45+0000 | 2026-06-26 08:56:45+0000 |
| nl_NL | 2026-06-09 10:37:20+0000 | 2026-06-09 10:37:20+0000 |
| de_DE | 2026-07-18 14:16:42+0000 | 2026-07-18 14:16:42+0000 |
Project-Id-Version and X-Generator do come through, so the reader itself works. Only the renamed key fails.
This matters because wp_get_installed_translations() falls back to the .l10n.php reader only when a translation has no sibling .po file. When that happens the installed revision date goes out empty, and the API offers the pack again even though what is installed is current.
Measured on trunk with the Twenty Twenty-Five nl_NL pack, freshly installed, changing nothing but whether the .po is on disk:
| state | wp_get_installed_translations() reports | offers after wp_update_themes()
|
| .po present | 2025-08-05 20:37:56+0000 | 0 |
| .po absent | empty string | 1 |
In the second row the installed pack is the exact one the API is serving. Every later check offers it again, which is why deleting the transient does not help: it gets regenerated on the next wp_update_plugins() or wp_update_themes(), exactly as @eskapism described in comment 5.
That also explains why 65429.patch did not settle it. Clearing the transient cannot help if the next check puts the offer straight back. @yasirkhalifa, your patch is treating a real symptom, the cause just sits earlier than where it acts.
Two theories from the thread that I can rule out:
- Language packs do ship a
.po. Every one I pulled contains.po,.mo,.l10n.phpand the JSON files. - The API timestamps are not out of step with the packs. For each locale above, the
updatedfield in the API response matches thePO-Revision-Dateinside the zip it points at, to the second.
What I cannot confirm from here is that this is what is happening on your sites, because on a normal install the update writes the .po back and the loop breaks on its own. It bites where the .po files are not on disk, for example a host that strips them, a deploy that ships only .mo and .l10n.php, or translations generated with wp i18n make-php.
So @josklever @psmits1567 @knutsp @eskapism, could you check whether wp-content/languages/plugins/ and wp-content/languages/themes/ on an affected site contain .po files next to the .mo and .l10n.php ones? If they do not, this is the cause. If they do, then something else is going on and I will keep looking.
The core side fix is small either way, since the key being read is wrong regardless of how often that branch is reached. POT-Creation-Date has the same problem and is not present in these files at all, so that one needs a decision rather than a rename.
#10
@
3 months ago
As far as I know the files were all present. I deleted the theme, and reinstalled it again. Then after checking the update, the message came back. Then after removing the transients and a refresh of the tab, the problem was gone.
#11
@
3 months ago
@bejignesh I haven't had issues recently, but I'm sure the .po files were present.
In my opinion this is more an infrastructure issue than a site issue.
#12
@
3 months ago
Thanks both, that settles it: if the .po files are present then the branch I was looking at never ran on your sites, so what I found is not the cause here. I am not going to try to make it fit.
It is a real defect on its own, so I have filed it separately as #65809 with a patch. Short version, GlotPress renamed the revision date key in .l10n.php files and core still reads the old name, which matters only when a translation has no .po next to it. Not your case.
Back to this ticket, one thing in the thread does not line up, and I think it is worth pulling on.
@psmits1567 in comment 10 says removing the transients and refreshing cleared it. @eskapism in comment 5 says the opposite, that deleting the transient does not help because the offer is regenerated on the next wp_update_plugins(). Those are not the same behaviour. A stale value sitting in a transient until something clears it, and a value that is correctly recomputed and still wrong, have different causes. It may be that there are two separate problems filed here, which would also explain why the fix that worked for Astra did nothing for Essential Addons.
@josklever, on the infrastructure point, I checked what I could reach from outside and it looked consistent. For the packs served for Simple History the updated field in the API response matched the PO-Revision-Date inside the zip it points at, to the second, for es_ES, nl_NL and de_DE. That does not rule out an intermittent or per-project problem on the .org side, it only says the data was coherent when I looked. Someone with visibility into the translate.wordpress.org side would settle it much faster than I can from here.
If either of you can still reproduce it, the single most useful thing would be, on an affected site, the value of PO-Revision-Date that core is reporting for the affected plugin or theme, next to the updated value the API is returning for it. That is:
$installed = wp_get_installed_translations( 'plugins' ); var_dump( $installed['THE-SLUG']['THE-LOCALE'] ); $t = get_site_transient( 'update_plugins' ); var_dump( $t->translations );
If those two disagree, the comparison is the problem and we can see which side is wrong. If they agree and the pack is still offered, then it is the API deciding to offer it and this needs to move to the Meta side.
#13
@
3 months ago
I was the one who contacted the Polyglots channel where @psmits1567 replied and we did some testing. I wanted to create a ticket if it wasn't a known issue, but Peter created one before I could. He did a test by deleting transients, but that never worked for me.
Only after creating a new translation version on GlotPress it was fixed. Peter made many of these changes so it got resolved at that time. I don't know the technical details about how this was working, but I remember that at that time there were more infrastructural issues with higher load or migrations or something, so that might be related.
#14
@
3 months ago
On my system deleting the transients did help, but after Jos still had problems, I tested what would happen, if I altered a string on that project. After altering and fetching the translations again, the problems were gone on the systems Jos keeps an eye on.
So the issue was lying deeper. I have not heard since about this issue anymore.
Fixed: _site_transient_update_themes not cleared after successful translation update