Skip to content

Block Editor: Accessing __experimentalLinkControl static properties throws error after stabilization #69861

@karthikeya-io

Description

@karthikeya-io

Description

After the stabilization of LinkControl in Gutenberg 19.9 (included in WordPress 6.8) , the deprecated export __experimentalLinkControl throws the following error when accessing DEFAULT_LINK_SETTINGS:

Uncaught TypeError: d.__experimentalLinkControl.DEFAULT_LINK_SETTINGS is not iterable

Using the stabilized LinkControl directly does not cause any issues. However, this can break any custom blocks that still rely on __experimentalLinkControl.

Step-by-step reproduction instructions

  1. Add any custom block that uses __experimentalLinkControl and access DEFAULT_LINK_SETTINGS
    or update the default button block

    to previously used __experimentalLinkControl
__experimentalLinkControl as LinkControl,
  1. Confirm the block shows the message This block has encountered an error and cannot be previewed. and the console logs the error Uncaught TypeError: d.__experimentalLinkControl.DEFAULT_LINK_SETTINGS is not iterable.

Screenshots, screen recording, code snippet

No response

Environment info

  • Gutenberg trunk

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] Block editor/packages/block-editor[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions