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

Blank theme generated without colors will throw errors with experimental Color randomizer #342

Closed
colorful-tones opened this issue Apr 27, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@colorful-tones
Copy link
Member

I've created an upstream issue to capture this and I'm not sure whether it is something that will likely be resolved in Gutenberg, or in Create Block Theme.

WordPress/gutenberg#50150

Here is same (copy/paste) ticket info...

Description

When using the Create Block Theme plugin to generate a blank theme, no colors are available in the blank theme's theme.json. Therefore, when you go to use the Color Randomizer, it throws an error in the console:

react-dom.min.js?ver=18:1 Uncaught TypeError: Cannot read properties of undefined (reading 'map')

Step-by-step reproduction instructions

  1. Activate Gutenberg and Create Block Theme plugin
  2. Be sure to go to Gutenberg > Experiments and activate the Color randomizer experiment.
  3. Visit Appearance > Create Block Theme (WP Admin)
  4. Choose 'Create a blank theme' and Save
  5. Visit Appearance > Themes, and activate the newly created blank theme
  6. Visit Global Styles > Colors in Appearance > Editor and hit the 'Randomize colors` (open browser console for error)

Note: after creating a blank theme you can deactivate the Create Block Theme plugin and the issue still persists.

Screenshot 2023-04-27 at 4 13 00 PM

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.2
Gutenberg 15.6.2
Create Block Theme plugin 1.8.2

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

@colorful-tones colorful-tones added the enhancement New feature or request label Apr 27, 2023
@t-hamano
Copy link
Contributor

t-hamano commented Jan 7, 2024

I think this problem was fixed in WordPress/gutenberg#51539.

@mikachan
Copy link
Member

mikachan commented Jan 8, 2024

I think this problem was fixed in WordPress/gutenberg#51539.

Yes I agree, nice! Please re-open if this issue is still happening with this plugin.

@mikachan mikachan closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants