[wp-trac] [WordPress Trac] #54800: Nonce creation causes DB access errors when initializing multisite networks

WordPress Trac noreply at wordpress.org
Tue Jan 18 14:41:04 UTC 2022


#54800: Nonce creation causes DB access errors when initializing multisite networks
----------------------------------------+---------------------
 Reporter:  schlessera                  |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  5.9.1
Component:  Script Loader               |     Version:  5.0
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch has-testing-info  |     Focuses:
----------------------------------------+---------------------
Changes (by hellofromTonya):

 * keywords:  has-patch reporter-feedback needs-testing-info => has-patch
     has-testing-info
 * priority:  high => normal
 * version:  5.8 => 5.0
 * severity:  major => normal
 * milestone:  5.9 => 5.9.1


Comment:

 [https://wordpress.slack.com/archives/C02RQBWTW/p1642463805117800 Adding a
 few notes from #core slack discussions]:

 @peterwilsoncc identified [51501] as the possible source that introduced
 the nonce table errors in 5.9
 >I ended up running bisect twice as it doesn’t quite make sense to me as
 to why [51501] would be introducing the nonce table erorrs.
 >
 >Following up the earlier notes for the database errors thrown during
 multisite installs (reported in #54801 and #54800). The errors during `wp
 core multisite-install` are new for 5.9 so it’s preferred to focus on
 those.
 >
 >Multiple errors when attempting to set the same via
 `set_site_transient()`
 >
 >These errors appear to be coming from to `wp_is_block_theme()` calls
 within the following locations:
 >* `create_initial_post_types()`
 >* `_add_default_theme_supports()`
 >* `wp_enable_block_templates()`
 >The nonce errors as reported due to the conditions `is_installing()` &&
 `! is_multisite()` when setting up the default scripts, this appears to
 have been added during the commit I mentioned above.


 Knowns:

 * [51501] highlighted the problem during `wp_installing()` as 3 new
 functions eventually call `get_theme_roots()` which then calls
 `get_transient()` for single site or `get_site_transient()` for multisite.
 `get_transient()` has checks for `wp_installing()` whereas
 `get_site_transient()` does not.
    * Peter opened #54849 to address this problem possibly in 5.9.1.

 * Root cause of the errors can be resolved in #54849.

 * Reporting of the errors (this ticket) is due to what @schlessera
 identified and fixed with [https://github.com/WordPress/wordpress-
 develop/pull/2147 PR 2147].

 * The code for this fix is from 5.0 (see #45065 and changeset [44114]).

 Next steps:

 * Lowering the severity level and priority as the reporting of the errors
 does not cause the upgrade or site to fail.

 * [https://github.com/WordPress/wordpress-develop/pull/2147 PR 2147] is
 ready for commit to `trunk`.

 * What about backporting to 5.9? Thinking this needs to move to 5.9.1 to
 go with #54849. Why?
    * The reporting of the errors were not introduced during RC or beta and
 are not blockers for a final release.
    * The severity of does not seem to be a blocker for 5.9 final release.
    * The root cause resolution (see #54849) is in 5.9.1 milestone.

 I welcome discussion on whether to backport to 5.9 during RC or push this
 to 5.9.1. Please note, if backport doesn't happen in time for RC3 today,
 backporting would require another RC release.

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


More information about the wp-trac mailing list