Skip to content

Polyfills are being registered for Web Stories editor and breaking screen #7457

@westonruter

Description

@westonruter

Bug Description

When the latest 2.4-alpha is active along with the latest Web Stories plugin (1.29.0), accessing the "Add New" screen to create a new web story results in an error:

image

For some reason, all of AMP's polyfills are getting injected on this screen.

Strangely, when I inspect wp.domReady it is defined but it is a module and not a function:

image

Expected Behaviour

Our polyfills should only ever get injected on the AMP Settings and AMP Onboarding Wizard.

When on the plugins list screen, themes list screen, or the edit post screen: we must never enqueue our polyfills or else we risk breaking compatibility with other plugins.

Screenshots

No response

PHP Version

8.0

Plugin Version

2.4-alpha

AMP plugin template mode

Standard, Transitional, Reader

WordPress Version

6.1.1

Site Health

No response

Gutenberg Version

No response

OS(s) Affected

No response

Browser(s) Affected

No response

Device(s) Affected

No response

Acceptance Criteria

No response

Implementation Brief

No response

QA Testing Instructions

No response

Demo

No response

Changelog Entry

No response

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingChangeloggedWhether the issue/PR has been added to release notes.P0High priority

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions