[wp-trac] [WordPress Trac] #53898: Duplicated 404 templates in the TemplatePanel
WordPress Trac
noreply at wordpress.org
Tue Aug 10 17:55:51 UTC 2021
#53898: Duplicated 404 templates in the TemplatePanel
------------------------------+-----------------------------
Reporter: Mamaduka | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.8.1
Component: Editor | Version: 5.8
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* owner: (none) => SergeyBiryukov
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"51595" 51595]:
{{{
#!CommitTicketReference repository="" revision="51595"
Editor: Preserve the original template keys when preparing a list of page
templates.
Previously, the original "404" template key was lost when "Default
template" is merged into the available templates array, as the
`array_merge()` function renumbers numeric keys. Later, when we merge
templates on the client side, this caused duplicate "404" templates to
appear in the dropdown.
By replacing the `array_merge()` call with `array_replace()`, we make sure
to keep the original numeric keys.
Props Mamaduka, Toro_Unit, youknowriad.
Fixes #53898.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53898#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list