WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 5 months ago

Last modified 5 months ago

#42722 closed defect (bug) (fixed)

Plugins failed to load

Reported by: solutiondriven Owned by: azaozz
Milestone: 4.9.3 Priority: normal
Severity: normal Version: 4.9
Component: TinyMCE Keywords: fixed-major
Focuses: javascript Cc:

Description (last modified by SergeyBiryukov)

After updating to WordPress 4.9, I am getting over 30 Console errors with a 403 status meanwhile all the plugins are present in the plugins folder. And then I get this error

tinymce.min.js?ver=4607-20171116:28 Uncaught (in promise) TypeError: Cannot read property 'getNotificationManagerImpl' of undefined

at h (tinymce.min.js?ver=4607-20171116:28) at k (tinymce.min.js?ver=4607-20171116:28) at <anonymous>

Attachments (2)

Screen Shot 2017-11-28 at 06.53.50.png (339.5 KB) - added by solutiondriven 7 months ago.
42722.diff (1.5 KB) - added by peterwilsoncc 5 months ago.

Download all attachments as: .zip

Change History (23)

#1 @dd32
7 months ago

  • Keywords reporter-feedback added

Hey @solutiondriven and welcome to Trac,

This sounds like it's either due to a partial upgrade, or a plugin/theme conflict. As there's been no other reports of this, it sounds like a much more localised issue than something general with 4.9.

Could you please try reinstalling WordPress first (It'll just refresh the files, to make sure they're all up to date) by going to Dashboard -> Updates and clicking reinstall? While you're there, check if there's any updates to plugins.

If neither of those fix it, if you could disable all plugins temporarily to see if one of those is causing the issue, that'd also be appreciated.

#2 @solutiondriven
7 months ago

Okay sure thing, will try it and see what I come up with.

#3 @dd32
7 months ago

I am getting over 30 Console errors with a 403 status meanwhile all the plugins are present in the plugins folder.

My apologies, I glanced over that - That kind of error would probably indicate a file permission error, using the builtin reinstaller may correct it, but it might also be a host-related block or something

#4 @adamx8
7 months ago

Following, this is happening to me after upgrading as well.

tinymce.min.js?ver=4607-20171116:28

#5 @adamx8
7 months ago

To follow up, I took the advice to reinstall 4.9 and the errors seem to go away. This could be the right fix.

#6 @nexthere
7 months ago

When I use minify plugin, this error occurred!

#7 @cbcjock
7 months ago

I also had this error, re-installing WordPress solved it.

#8 @solutiondriven
6 months ago

Reinstalling Wordpress does not solve this error for me.

#9 @conner_bw
6 months ago

I came here from:

https://github.com/tinymce/tinymce/issues/3947

Since October 2017 dozens of people are reporting this exact same issue in the above ticket. Hashtag me too.

In the WordPress 4.9 admin dashboard, I get the same JS error in the console - but it only appears when I scroll. Even weirder: when the page loads and I don't scroll until it's finished loading, the error will not show up.

Same for me when I'm on an Admin page using both Select2 JS (bundled with a custom fields plugin) and wp_editor.

#10 @corbanb
6 months ago

What does reinstalling wordpress mean? I use a deploy system that pulls fresh wordpress files each time and would always be "reinstalled" on every deploy but still seeing this issue.

Admins, editors can't see styles isn't going over so well.

#11 @peterwilsoncc
6 months ago

  • Component changed from Plugins to Editor
  • Focuses javascript added
  • Keywords reporter-feedback removed

The original report appears to cover two seperate issues. As @dd32 suggests, the 403 errors are likely a broken install.

The uncaught promises are the result of a TinyMCE bug fixed by a recent commit on the TinyMCE repo. It was fixed in TinyMCE 4.7.0

I've been able to reliably reproduce it under the following conditions on the WP 4.9 branch:

  • multiple instances of wp_editor() are correctly called on the edit screen
  • TinyMCE is not cached by the browser and a scroll event is triggered before it loads

@azaozz @iseulde would you consider bumping/hacking TinyMCE for WP 4.9.2?

#12 @azaozz
6 months ago

  • Milestone changed from Awaiting Review to 4.9.2

Yes, seems we will have to update TinyMCE in a dot release, don't think we can backport this fix. There are also other bugs that will be fixed, see #43012.

@peterwilsoncc
5 months ago

#13 @peterwilsoncc
5 months ago

@azaozz

I've uploaded 42722.diff which I think covers the required fixes only for TinyMCE if you'd rather include only the fixes.

Unfortunately the TinyMCE commit referenced covers two unrelated changes so it's a little unclear as to which portion is the fix and which portion is the enhancement.

#14 follow-up: @azaozz
5 months ago

@peterwilsoncc yep, I got pretty much the same patch plus a bit more to fix the second part of #43012. The problem is that we will also have to update tinymce.min.js. We cannot rebuild TinyMCE 4.6.7 as it pulls scripts from other locations that are usually different/updated. We can try to patch and minify tinymce.js the same way we minify the rest of the core js but that yields different results. This should be "safe" to do however there is a (tiny) chance to introduce regressions and I'd be "nervous" to try it in a dot release. Seems the best option is to have a long-ish beta and try to get it tested extensively.

#15 @dd32
5 months ago

  • Milestone changed from 4.9.2 to 4.9.3

Bumping to 4.9.3 due to 4.9.2s release

#16 in reply to: ↑ 14 ; follow-up: @SergeyBiryukov
5 months ago

Replying to azaozz:

@peterwilsoncc yep, I got pretty much the same patch plus a bit more to fix the second part of #43012. The problem is that we will also have to update tinymce.min.js.

Would you be able to commit this today?

#17 in reply to: ↑ 16 @azaozz
5 months ago

Replying to SergeyBiryukov:

Yes, nearly ready.

#18 @azaozz
5 months ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 42576:

TinyMCE: backport bug fixes to NotificationManager and WindowManager from https://github.com/tinymce/tinymce/commit/d1877933fa1e98430e5e9e1f78884be60766d2f0#diff-2e5c98d81ce2481aa1042b2320728b65 and to MultiRange from https://github.com/tinymce/tinymce/commit/250675bb7bae2e6ef5cef715ef57cdf5ab6bff8a.

Props peterwilsoncc, azaozz.
Fixes #42722 for trunk, see #43012.

#19 @azaozz
5 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 4.9.3.

#20 @azaozz
5 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 42577:

Merged revision(s) 42576 from trunk:
TinyMCE: backport bug fixes to NotificationManager and WindowManager from https://github.com/tinymce/tinymce/commit/d1877933fa1e98430e5e9e1f78884be60766d2f0#diff-2e5c98d81ce2481aa1042b2320728b65 and to MultiRange from https://github.com/tinymce/tinymce/commit/250675bb7bae2e6ef5cef715ef57cdf5ab6bff8a.

Props peterwilsoncc, azaozz.
Fixes #42722 for 4.9.3, see #43012.

#21 @SergeyBiryukov
5 months ago

  • Component changed from Editor to TinyMCE
  • Description modified (diff)
Note: See TracTickets for help on using tickets.