Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33702 closed defect (bug) (invalid)

Editor strips line breaks

Reported by: cyril-washbrook's profile Cyril Washbrook Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Editor Keywords:
Focuses: Cc:

Description

Since upgrading from WP 4.2.4 to WP 4.3, the editor has been stripping line breaks from all posts and pages. Clearly, this cannot be affecting everyone, but I suggest, for the reasons that follow, that there is at least some reason to believe that the error stems from some flaw in WP 4.3 itself.

The problem unfolds as follows:
(1) I start with WP 4.2.4.
(2) I update WP 4.3 (either manually or automatically).
(3) There is initially no change to pages/posts immediately after the update.
(4) When I open a post or page and edit it, the line breaks vanish.
(5) If I try to add line breaks, they are stripped out again when I save or publish the post (or when I switch from code view to WYSIWYG view).

I have done all of the following:

(1) disabled all plugins;
(2) switched to several Wordpress default themes;
(3) manually downgraded to 4.2.4 and upgraded (both manually by FTP and automatically) again to 4.3;
(4) accessed the site through Chrome, Firefox and IE.

Further information:

(1) Manual downgrades and upgrades have been done by deleting the /wp-admin and /wp-includes directories and uploading freshly downloaded files, and uploading the "loose" files to the top-level directory.
(2) At no stage have I edited, added to or removed any core files (not that this should make a difference in light of the various steps I have taken).

The results:

(1) The problem only occurs in 4.3.
(2) Downgrading to 4.2.4 always resolves the problem.
(3) The problem persists when all plugins are disabled and one of the default themes is activated.
(4) The problem occurs across all browsers.

Change History (4)

#1 @azaozz
9 years ago

  • Keywords reporter-feedback added

It's really strange that the problem still persists after all the steps you've taken to troubleshoot it. There are three more things to try:

There was a change in 4.3 in the way wpautop() is run when loading the content in the visual editor. Now it uses the JS version of it, so any JS errors on the page may prevent it from running.

In some rare cases the browser (or network) cache may not get refreshed properly despite that we've changed the query string to force a refresh. In these cases holding Shift while reloading the page a few times in Firefox may fix it.

#2 @Cyril Washbrook
9 years ago

Thanks very much, Andrew. I switched on script debugging and it resolved the problem. So I think you are right: it was a JS glitch associated with the changes to editor initialisation that you mentioned.

I've also just seen your post and the subsequent discussion over at the blog, which was enlightening.

#3 @Cyril Washbrook
9 years ago

  • Keywords reporter-feedback removed

#4 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.