Skip to content

Interactivity API - Countdown Block - broken w/out Gutenberg plugin active #90

@flexseth

Description

@flexseth

Explanation: Requires Gutenberg

Plugin requires header

How to use the header

Todo

  • Find how to require a plugin in the header
Requires Plugins: gutenberg

Background

The Interactivity API won't work without the Gutenberg Plugin active. There's a new header that will throw an error in the dashboard for this (as of 6.5). Trying to get word on this header so it can be documented.

How was it discovered?

The Playground demo worked, so the code wasn't broken.

raw blueprint file

{
        "step": "installPlugin",
        "pluginZipFile": {
          "resource": "wordpress.org/plugins",
          "slug": "gutenberg"
        }

Error track

from console

Uncaught TypeError: Cannot read properties of undefined (reading 'startCountdown')
    at interactivity.min.js?ver=6.5:2:25942
    at Array.forEach (<anonymous>)
    at interactivity.min.js?ver=6.5:2:25927
    at interactivity.min.js?ver=6.5:2:25951
    at interactivity.min.js?ver=6.5:2:29636
    at Object.__ (interactivity.min.js?ver=6.5:2:27702)
    at vt (interactivity.min.js?ver=6.5:2:13563)
    at Array.forEach (<anonymous>)
    at at (interactivity.min.js?ver=6.5:2:12275)

Steps to reproduce

  • Clone the repo
  • Move blocks from /plugins to /wp-content/plugins in your installation
  • Install packages
  • Run build
  • Insert interactive countdown block
  • No countdown

Possible culprits

  • 👋 Gutenberg not installed?
  • 🚫 interactivity API dependencies in package-lock.json?
  • 🚫 viewScript changes?
  • ⁇ No data from datastore?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions