Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP 4.9 + Gutenberg: Uncaught TypeError: Object(...) is not a function on settings page #6194

Closed
aaemnnosttv opened this issue May 11, 2021 · 1 comment · Fixed by #6225
Closed
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@aaemnnosttv
Copy link
Contributor

aaemnnosttv commented May 11, 2021

Bug Description

As of AMP 2.1, the AMP settings page now loads a blank screen with the following error in the console with WP 4.9:

amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:9 Uncaught TypeError: Object(...) is not a function
    at amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:9
    at Object.<anonymous> (amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:9)
    at n (amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1)
    at Module.<anonymous> (amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:29)
    at Module.<anonymous> (amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:29)
    at n (amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1)
    at Object.<anonymous> (amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:29)
    at n (amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1)
    at amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1
    at amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1
(anonymous) @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:9
(anonymous) @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:9
n @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1
(anonymous) @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:29
(anonymous) @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:29
n @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1
(anonymous) @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:29
n @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1
(anonymous) @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1
(anonymous) @ amp-settings.js?ver=a588d4c54efa16d65aeca1df56a057dd:1

Expected Behaviour

The settings page should load as usual 🙏

Steps to reproduce

  1. Use latest 4.9 version of WordPress
  2. Install Gutenberg 4.9.0 (not possible to install newer version)
  3. Install and activate the latest version of AMP (currently 2.1.1)
  4. Navigate to the AMP settings page
  5. See screen as shown above

Screenshots

image

Additional context

  • WordPress version: 4.9.17
  • Plugin version: 2.1.1
  • Gutenberg plugin version (if applicable): 4.9.0
  • PHP version: 7.4.19

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Test cases to check, if support is absent:

  • Block editor should show upgrade notice.
  • Classic editor (without Gutemberg in 4.9 and w/ Classic Editor plugin in 5.0+) should show notice with AMP enabled status.
  • Validation Counts should be omitted from admin menu.
  • AMP Settings screen should work as expected, but with an upgrade notice shown.
  • Onboarding Wizard should work normally.
  • Paired browsing should not be available.
  • AMP Customizer does still work.

Environments to check:

  • WordPress 4.9 with Gutenberg 4.9.0
  • WordPress 4.9 without Gutenberg
  • WordPress 5.5.5 without Gutenberg nor Classic Editor
  • WordPress 5.5.5 with Gutenberg 8.9.0
  • WordPress 5.5.5 with Classic Editor
  • WordPress 5.6.4 without Gutenberg nor Classic Editor
  • WordPress 5.6.4 with Gutenberg 10.2.0
  • WordPress 5.6.4 with Classic Editor
  • WordPress 5.7 without Gutenberg nor Classic Editor
  • WordPress 5.7 with latest Gutenberg
  • WordPress 5.7 with Classic Editor

Demo

Changelog entry

@pierlon
Copy link
Contributor

pierlon commented May 18, 2021

QA Passed

WP 5.7.2

  • ✅ No upgrade notice shown in block editor when neither Gutenberg nor Classic Editor plugins are active
  • ✅ No upgrade notice shown in block editor when latest Gutenberg plugin (v10.6.1) active
  • ✅ No notice about AMP Enabled status in editor when latest Classic Editor plugin (v1.6) active
  • ✅ Validation counts are fetched and updated successfully via AJAX
  • ✅ AMP Settings screen works normally
  • ✅ AMP Onboarding Wizard screen works normally
  • ✅ Paired Browsing works normally
  • ✅ AMP Customizer works normally

WP 4.9.17

  • ✅ Upgrade notice shown in block editor when Gutenberg v4.9.0 is active
  • ✅ Upgrade notice is shown below AMP Enabled status in classic editor
  • ✅ Validation counts are omitted from admin menu
  • ✅ AMP Settings screen works normally, and shows upgrade notice
  • ✅ AMP Onboarding Wizard screen works normally
  • ✅ Paired Browsing is not available
  • ✅ AMP Customizer works normally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
2 participants