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

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

Closed
4 tasks done
flexseth opened this issue Apr 3, 2024 · 1 comment
Closed
4 tasks done

Comments

@flexseth
Copy link
Contributor

flexseth commented Apr 3, 2024

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?
@flexseth
Copy link
Contributor Author

closing, fixed by PR

@ryanwelcher - please review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant