[wp-trac] [WordPress Trac] #46089: Memory exhaustion when setting script translations on `wp-i18n`

WordPress Trac noreply at wordpress.org
Thu Feb 4 05:53:21 UTC 2021


#46089: Memory exhaustion when setting script translations on `wp-i18n`
----------------------------------------+-----------------------------
 Reporter:  aduth                       |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Script Loader               |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------
Changes (by noisysocks):

 * keywords:  has-patch needs-refresh => has-patch needs-unit-tests
 * milestone:  5.7 => Future Release


Comment:

 I did some experimentation here and [attachment:"46089.diff"] is a very
 rough proof of concept for what I described in my comment above. It fixes
 the infinite recursion but needs tests, testing, and to be prettied up.

 It looks as though we need the workaround in GB28279 even if this bug is
 fixed, though. This is because WordPress will print a script’s
 translations **before** it prints the script. This means that `wp-i18n`’s
 translations will try to call `wp.i18n.setLocaleData()` before `wp.i18n`
 is defined.

 For this reason I am moving this ticket tout of 5.7 and will create a new
 ticket which implements the workaround in GB28279.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46089#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list