#53762 closed enhancement (fixed)
Replace the remaining references to wp.editor with wp.oldEditor
Reported by: | zieladam | Owned by: | azaozz |
---|---|---|---|
Milestone: | 5.8.1 | Priority: | highest omg bbq |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description (last modified by )
In #53437 we replaced some references to wp.editor
(the legacy TinyMCE one) with wp.oldEditor
(thanks to @spacedmonkey). In this ticket we replace the remaining references.
The long-term goal is to resolve the conflicts with wp.editor
, the Gutenberg module. We cannot fully remove wp.editor
(the legacy TinyMCE one) because many plugins depend on it. We can, however, deprecate it.
Step 1: wp.editor
but replace references to wp.editor
with wp.oldEditor
Step 2: Deprecate wp.editor
, add a dev note
Step 3: Phase out wp.editor
(the legacy TinyMCE one)
cc @noisysocks @desrosj @spacedmonkey
Attachments (4)
Change History (24)
This ticket was mentioned in PR #1516 on WordPress/wordpress-develop by adamziel.
3 years ago
#1
#2
@
3 years ago
- Component changed from General to Editor
- Description modified (diff)
- Milestone changed from Awaiting Review to 5.8.1
spacedmonkey commented on PR #1516:
3 years ago
#3
👍
#4
@
3 years ago
@zieladam Thanks for the ticket. I had in my mind to create it myself.
For extra context, @desrosj already commited a patch for me in aid of this. See [51409].
I think we should commit #1516 in WordPress 5.8.1 and looking at Deprecate wp.editor in 5.9. I don't think we should be deprecating stuff in point releases.
I think we should add a call to the deprecated package when calling wp.editor.initialize
. However, I think try and keep the functionality working. Let developers see the deprecated message and give them sometime to fix it. After a couple of releases, then we finally remove it.
#5
@
3 years ago
I think we should commit #1516 in WordPress 5.8.1 and looking at Deprecate wp.editor in 5.9. I don't think we should be deprecating stuff in point releases.
Absolutely agreed! Let's prepare a WP 5.9 PR/Ticket related to the deprecated
call once PR 1516 lands.
#6
@
3 years ago
- Keywords commit added; dev-feedback removed
https://github.com/WordPress/wordpress-develop/pull/1516 was approved by @azaozz so I'm adding the commit
keyword
#7
@
3 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In 51649:
#8
@
3 years ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopen for 5.8.1.
#10
@
3 years ago
- Priority changed from normal to highest omg bbq
- Resolution fixed deleted
- Status changed from closed to reopened
There seems to be a regression here. This line
window.wp.editor = window.wp.oldEditor = window.wp.oldEditor || {};
overwrites wp.editor
with wp.oldEditor
. The old code was just adding to wp.editor
:
window.wp.editor = window.wp.editor || {}; window.wp.editor.getDefaultSettings = function() { ...
Patch coming up.
#11
@
3 years ago
In 53762.diff: fix the overwriting of wp.editor
with wp.oldEditor
in the inline script outputted when enqueuing the old editor. Add getDefaultSettings()
to both for full back-compat.
#12
@
3 years ago
53762.diff looks good to me.
#15
@
3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
@azaozz I’ve just gave the latest patch ( [51749] ) a try in my test environment, and I’m not sure that it really fixes all the issues we have seen.
Feels like perhaps there is one more place where the wp.editor
is being overridden with the wp.oldEditor
.
Looks like the change in https://build.trac.wordpress.org/changeset/51255/#file2 on line 8 has the same effect as the one which was patched in [51749]
Trac ticket: https://core.trac.wordpress.org/ticket/53762