Make WordPress Core

Opened 5 years ago

Closed 2 months ago

#50216 closed defect (bug) (invalid)

On the bug of replace_editor

Reported by: jack960330's profile jack960330 Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.4.1
Component: Editor Keywords:
Focuses: Cc:

Description

I'll submit a suspected bug, replace_editor seems that editor's hook will load twice when loading the existing articles, which makes me have to deal with the code. In wp5.3, I have to use js to delete the unnecessary DOM, and at the same time, my katex's auto renderer cannot work properly (browser recognition is executed in weird mode). In wp5.4.x, because $post is null in this case, I can
directly return through judgment. But this is not normal. I will send the message to the core channel at the same time.

Change History (4)

This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.


4 years ago

#2 @mimitips
4 years ago

@jack960330 Thank you for reporting. It looks like the ticket #51258 talks about the same thing. Please check that one out if you want.

#3 @jack960330
4 years ago

I looked at #51258 and I'm a little unsure what the exact relation is to this issue

#4 @jeremyfelt
2 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi @jack960330 - thanks for the report.

It's likely this is no longer an issue, as neither Gutenberg or WordPress actually uses the replace_editor filter to inject any markup. That said, if someone has a setup that accidentally hooks into replace_editor more than once, then there is definitely a chance for duplicate markup and any plugin developers should code defensively to account for that.

Note: See TracTickets for help on using tickets.