Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#53481 closed defect (bug) (duplicate)

Widget Block Editor: fatal error caused by unknown gutenberg_get_widget_key() function

Reported by: imath's profile imath Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.8
Component: Widgets Keywords: has-patch
Focuses: Cc:

Description

Hi,

I just noticed this fatal error when using the Widget Block editor:

https://cldup.com/j2ErippzGB.png

Using the attached patch is fixing the issue, but I've noticed the source file is always reverted to the previous version when running grunt build so I guess the issue might be into this process.

Attachments (3)

53481.patch (1.3 KB) - added by imath 3 years ago.
53481-test-before.png (533.2 KB) - added by hellofromTonya 3 years ago.
Before changeset 51216: can reproduce fatal error with legacy wdiget
53481-test-after.png (339.1 KB) - added by hellofromTonya 3 years ago.
Test after changeset 51216: fatal error resolved. Works as expected ✅

Download all attachments as: .zip

Change History (11)

@imath
3 years ago

#2 @spacedmonkey
3 years ago

This issue will be fixed when #53427 is merged.

As for the removal of these gutenberg functions being removed, this should be handled in #53441

#3 @spacedmonkey
3 years ago

This issue will be fixed when #53427 is merged.

As for the removal of these gutenberg functions being removed, this should be handled in #53441

#4 @desrosj
3 years ago

  • Milestone changed from Awaiting Review to 5.8

Moving to the milestone to track, but probably should be a duplicate.

@hellofromTonya
3 years ago

Before changeset 51216: can reproduce fatal error with legacy wdiget

@hellofromTonya
3 years ago

Test after changeset 51216: fatal error resolved. Works as expected ✅

#5 @hellofromTonya
3 years ago

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

Testing

Env:

  • OS: macOS Big Sur
  • Browser: Firefox and Chrome
  • Plugins: none

Testing with Beta 2

I can reproduce the problem ✅

Testing with Beta 3

Problem is resolved ✅

How?

Changeset [51216] from ticket #53427 added the new WP_Widget_Factory::get_widget_key method, which is the first conditional. With that new method, the else conditional is never reached in 5.8. The Gutenberg function gutenberg_get_widget_key will addressed separately but should no longer be a problem for causing fatal errors.

Marking the ticket as fixed.

@imath if you get time, could you also test and confirm it resolves the issue for you? If no, please reopen.

#6 @desrosj
3 years ago

In 51229:

Coding Standards: Apply an alignment fix from running composer format.

Follow up to [51216].
See #53481.

#7 @imath
3 years ago

@hellofromTonya thanks for your update. I've just tested and I confirm it fixed the issue for me.

#8 @desrosj
3 years ago

  • Milestone 5.8 deleted
  • Resolution changed from fixed to duplicate

Duplicate of #53427.

Note: See TracTickets for help on using tickets.