Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#40855 closed defect (bug) (worksforme)

TinyMCE error when selecting an image in WordPress 4.5/4.6

Reported by: khromov's profile khromov Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.7
Component: TinyMCE Keywords: close
Focuses: Cc:

Description

This is related to issues #40305 and #40360

Specifically, it relates to how this issue should be mitigated for older WordPress version. As it currently is, inserting images into the WYSIWYG is broken for Chrome users running anything lower than WordPress 4.7, because those WordPress versions run an older version of TinyMCE.

I would like to see a backported patch for older versions to resolve this issue. Not doing that would be a very troubling precedent - essentially breaking the editor for anyone not on the latest version of WordPress.

The issue:

  • Insert an image via Add media dialogue
  • Click on the image
  • The image box/buttos do not appear, error in console is:
tinymce.min.js?ver=4310-20160418:10 Uncaught DOMException: Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 1.

This issue in the TinyMCE tracker:
https://github.com/tinymce/tinymce/issues/3611

Change History (6)

#1 @khromov
7 years ago

Anyone?

#2 @DrewAPicture
7 years ago

  • Component changed from General to TinyMCE

#3 @azaozz
7 years ago

  • Keywords close added

Don't think it is possible to backport the TinyMCE patch, and that certainly is not supported by them. "Backporting" the whole TinyMCE editor is not possible either as it would likely break older plugins that expect the old version or/and some of the newer functionality like wpviews.

The best option is to update WordPress.

#4 follow-up: @khromov
7 years ago

@azaozz I'm sure you know that some people are stuck on older WordPress versions for various reasons.

It's very concerning that there wouldn't be an attempt to fix this, because it makes image editing impossible in the worlds most popular browsers for over 33% of all WordPress installs.

https://wordpress.org/about/stats/

#5 in reply to: ↑ 4 @azaozz
7 years ago

Replying to khromov:

I understand, but what are the alternatives:

  1. "Hack" TinyMCE's core by backporting the fix. This will be quite complex; might work for one old version and fail for another; may bring other regressions that would be hard to detect, so we will end up breaking something else.
  1. Update TinyMCE in old WordPress versions. This may need updating other components like mce-view.js and may break (older) TinyMCE plugins that are added by WordPress plugins. Chances are it will work on some sites but introduce regressions on others.
  1. Resolving the existing problems and updating WordPress. This is the preferred solution as it also means things are going to continue working properly in the future.

Note that this is not a typical WordPress problem. Example: you're running a company that has 100 employees and each has a computer. All the computers run WinXP as you have an old but important piece of software that would be harder (or expensive) to replace/update. Now another important piece of software requires Windows10 to continue working properly.

What would you do? :)

Version 0, edited 7 years ago by azaozz (next)

#6 @azaozz
5 years ago

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

Incompatibilities caused by browser updates are hard to fix. Still thinking that the best option in these cases is to update all software as that means things are going to continue working properly in the future.

Note: See TracTickets for help on using tickets.