WordPress.org

Make WordPress Core

#45158 closed defect (bug) (fixed)

JavaScript error when editing posts

Reported by: pento Owned by: pento
Milestone: 5.0 Priority: normal
Severity: normal Version: 5.0
Component: Editor Keywords: fixed-5.0
Focuses: javascript Cc:
PR Number:

Description

We've had a few reports of this error showing up when editing posts:

TypeError: Cannot read property ‘length’ of undefined
at i (http://wpguida2.wpabc.it/wp-includes/js/dist/date.min.js?ver=5.0-alpha-43816:1:3777)
at d (http://wpguida2.wpabc.it/wp-includes/js/dist/date.min.js?ver=5.0-alpha-43816:1:4419)
at http://wpguida2.wpabc.it/wp-includes/js/dist/editor.min.js?ver=5.0-alpha-43816:55:210644
at Ug (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:90:242)
at Vg (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:92:379)
at Kf (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:118:136)
at Lf (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:118:472)
at jc (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:127:342)
at aa (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:126:505)
at Rf (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:138:435)

Change History (8)

#1 @pento
13 months ago

  • Component changed from General to Editor
  • Focuses javascript added

#2 @monikarao
13 months ago

I've tried to edit post/page and getting same error.

#3 @chetan200891
13 months ago

I am getting below error. When I edit page.

TypeError: "c is undefined"

Screenshot attached below.

https://i.snag.gy/IyMcp6.jpg

#4 @pento
13 months ago

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

In 43818:

Scripts: Add a missing date format to the wp-date config.

wp-date recently added the datetimeAbbreviated format, but the config wasn't sending it on page load.

Fixes #45158.

#5 @pento
13 months ago

  • Keywords needs-patch removed

The nightly build has been updated with this fix.

http://wordpress.org/nightly-builds/wordpress-5.0-latest.zip

#6 @SergeyBiryukov
13 months ago

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

Reopening for trunk.

#7 in reply to: ↑ description @mariyan96
12 months ago

Hello, I've tried to reproduce the problem, but everything seems fine on my end.It's tested on the latest SVN version when trying to edit/update/save existing post.

TypeError: Cannot read property ‘length’ of undefined
at i (http://wpguida2.wpabc.it/wp-includes/js/dist/date.min.js?ver=5.0-alpha-43816:1:3777)
at d (http://wpguida2.wpabc.it/wp-includes/js/dist/date.min.js?ver=5.0-alpha-43816:1:4419)
at http://wpguida2.wpabc.it/wp-includes/js/dist/editor.min.js?ver=5.0-alpha-43816:55:210644
at Ug (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:90:242)
at Vg (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:92:379)
at Kf (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:118:136)
at Lf (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:118:472)
at jc (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:127:342)
at aa (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:126:505)
at Rf (http://wpguida2.wpabc.it/wp-includes/js/dist/vendor/react-dom.min.js?ver=5.0-alpha-43816:138:435)
Last edited 12 months ago by mariyan96 (previous) (diff)

#8 @desrosj
11 months ago

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

In 44162:

Scripts: Add a missing date format to the wp-date config.

wp-date recently added the datetimeAbbreviated format, but the config wasn't sending it on page load.

Props pento.

Merges [43818] to trunk.

Fixes #45158.

Note: See TracTickets for help on using tickets.