WordPress.org

Make WordPress Core

Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#51321 closed defect (bug) (invalid)

'The editor has encountered an unexpected error': can't add new posts or edit existing ones

Reported by: pivic Owned by:
Milestone: Priority: normal
Severity: trivial Version:
Component: Plugins Keywords:
Focuses: Cc:

Description

Hey there!

I'm using WordPress 5.6-alpha-48978 on PHP 7.4 (ea-php74). I just upgraded from PHP 7.3 to 7.4 and I mention that just to make you aware of it.

I've just come across an error that I've not seen before. I just tried to edit an existing post and saw an error message saying 'The editor has encountered an unexpected error'. This is the copied error message:

TypeError: this.activateMode is not a function
    at https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:24708
    at st (https://niklasblog.com/wp-content/plugins/editorplus/build/build.js?ver=1.7.0:22:4747)
    at Function.sa (https://niklasblog.com/wp-content/plugins/editorplus/build/build.js?ver=1.7.0:22:40893)
    at i._createModes (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:24668)
    at initialize (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:24077)
    at initialize (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:25732)
    at initialize (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:29623)
    at i.h.View (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:14225)
    at i.constructor (https://niklasblog.com/wp-includes/js/wp-backbone.min.js?ver=5.6-alpha-48978:2:2608)
    at i.constructor (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:23524)
    at i [as constructor] (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:23610)
    at i [as constructor] (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:23610)
    at i [as constructor] (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:23610)
    at new i (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:23610)
    at Object.wp.media (https://niklasblog.com/wp-includes/js/media-models.min.js?ver=5.6-alpha-48978:2:1142)
    at new s (https://niklasblog.com/wp-content/plugins/gutenberg/build/media-utils/index.js?ver=77af8d1260f334d2298ac896eef3ce05:1:6376)
    at r.<anonymous> (https://niklasblog.com/wp-content/plugins/unsplash/assets/js/featured-image-selector.js?ver=156ffe2e1e481c09c0bf3d0c60ef8884:1:8778)
    at new r (https://niklasblog.com/wp-content/plugins/unsplash/assets/js/featured-image-selector.js?ver=156ffe2e1e481c09c0bf3d0c60ef8884:1:8892)
    at Yg (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:68:243)
    at rh (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:98:274)
    at zj (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:228:490)
    at Th (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:152:223)
    at tj (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:152:152)
    at Te (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:146:151)
    at https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:61:68
    at unstable_runWithPriority (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react.min.e713ea3b.js:25:260)
    at Da (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:60:280)
    at Pg (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:61:14)
    at ha (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:60:451)
    at Ja (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:224:400)
    at ch (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:93:79)
    at e (https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:27747)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:27831
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:21752
    at Array.forEach (<anonymous>)
    at o (https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:21724)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:18957
    at p (https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:11202)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:9797
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:12614
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:13049
    at dispatch (https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:12327)
    at n (https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:9472)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:5224
    at Array.some (<anonymous>)
    at e (https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:5199)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:5152

I reverted to PHP 7.3 but to no avail; I still am not able to edit any posts.

This also goes for attempting to create new posts. I'm not sure whether the error message is exactly the same as above, but here's the new-post error message:

TypeError: this.activateMode is not a function
    at https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:24708
    at st (https://niklasblog.com/wp-content/plugins/editorplus/build/build.js?ver=1.7.0:22:4747)
    at Function.sa (https://niklasblog.com/wp-content/plugins/editorplus/build/build.js?ver=1.7.0:22:40893)
    at i._createModes (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:24668)
    at initialize (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:24077)
    at initialize (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:25732)
    at initialize (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:29623)
    at i.h.View (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:14225)
    at i.constructor (https://niklasblog.com/wp-includes/js/wp-backbone.min.js?ver=5.6-alpha-48978:2:2608)
    at i.constructor (https://niklasblog.com/wp-includes/js/media-views.min.js?ver=5.6-alpha-48978:2:23524)
    at i [as constructor] (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:23610)
    at i [as constructor] (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:23610)
    at i [as constructor] (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:23610)
    at new i (https://niklasblog.com/wp-includes/js/backbone.min.js?ver=1.4.0:2:23610)
    at Object.wp.media (https://niklasblog.com/wp-includes/js/media-models.min.js?ver=5.6-alpha-48978:2:1142)
    at new s (https://niklasblog.com/wp-content/plugins/gutenberg/build/media-utils/index.js?ver=77af8d1260f334d2298ac896eef3ce05:1:6376)
    at r.<anonymous> (https://niklasblog.com/wp-content/plugins/unsplash/assets/js/featured-image-selector.js?ver=156ffe2e1e481c09c0bf3d0c60ef8884:1:8778)
    at new r (https://niklasblog.com/wp-content/plugins/unsplash/assets/js/featured-image-selector.js?ver=156ffe2e1e481c09c0bf3d0c60ef8884:1:8892)
    at Yg (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:68:243)
    at rh (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:98:274)
    at zj (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:228:490)
    at Th (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:152:223)
    at tj (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:152:152)
    at Te (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:146:151)
    at https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:61:68
    at unstable_runWithPriority (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react.min.e713ea3b.js:25:260)
    at Da (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:60:280)
    at Pg (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:61:14)
    at ha (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:60:451)
    at Ja (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:224:400)
    at ch (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:93:79)
    at e (https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:27747)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:27831
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:21752
    at Array.forEach (<anonymous>)
    at o (https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:21724)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:18957
    at p (https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:11202)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:9797
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:12614
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:13049
    at dispatch (https://niklasblog.com/wp-content/plugins/gutenberg/build/data/index.js?ver=86e17756483edb79c5c2acf422ecb400:1:12327)
    at n (https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:9472)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:5224
    at Array.some (<anonymous>)
    at e (https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:5199)
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/redux-routine/index.js?ver=ad785dcae37e85d5d48a4af4f6b5e6d8:1:5152

Change History (4)

#1 @pivic
13 months ago

Addition: I just updated Gutenberg 8.9.3 to 9.0.0 and the error is still there. Here's a newly copied error log:

TypeError: r is not a function
    at https://niklasblog.com/wp-content/plugins/gutenberg/build/components/index.js?ver=5e6490b37bc8c5fb45786ae5f3ea66de:3:29105
    at Bh (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:126:456)
    at Dj (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:162:476)
    at unstable_runWithPriority (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react.min.e713ea3b.js:25:260)
    at Da (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:60:280)
    at xb (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:162:231)
    at mk.Events.current (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:236:102)
    at Ei (https://niklasblog.com/wp-content/plugins/gutenberg/vendor/react-dom.min.de439aae.js:41:59)

#2 @pivic
13 months ago

I may be on to something here. I just deactivated all of my 38 active plugins and I can now add new pages. Will try to enable them one by one and see what happens.

#3 @pivic
13 months ago

  • Component changed from General to Plugins
  • Resolution set to invalid
  • Severity changed from critical to trivial
  • Status changed from new to closed

Found it. It's (Editor Plus)https://wordpress.org/plugins/editorplus/ that is the offending plugin.

I've let the author know via Twitter: https://twitter.com/pivic/status/1306133677290729472

#4 @SergeyBiryukov
13 months ago

  • Milestone Awaiting Review deleted

Hi there, welcome to WordPress Trac! Thanks for the ticket and the follow-up.

It looks like the plugin was updated to fix this. Glad you got it resolved!

Last edited 13 months ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.