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

buDefaultThemes (color themes) don't get appended to editor-settings object on non-prepress post types #311

Open
acketon opened this issue Mar 30, 2022 · 0 comments
Labels
🧐 Needs: Developer 🔥 Product bug A bug which is not directly related to a custom child theme.

Comments

@acketon
Copy link
Member

acketon commented Mar 30, 2022

This bug was found during CFA by @hirozed and I. The buDefaultThemes function here:
https://github.com/bu-ist/bu-blocks/blob/develop/src/init.php#L232
is limited to only load on post types returned in the bu_prepress_get_post_types() function. So when blocks are extended to non-prepress post types this seems to fail and the editor settings don't have the buDefaultThemes color arrays to use. Since non-prepress post types don't have a publication applied the buPublicationThemes part of the blocks also doesn't work (as expected) so you get no color themes showing up.

I think we need to remove this and try loading the buDefaultThemes everywhere.
A PR for CFA has more details written up: https://github.com/bu-ist/r2-cfa/pull/271

Here is an example of how a block ultimately loads the colors from either buDefaultThemes or buPublicationThemes: https://github.com/bu-ist/bu-blocks/blob/develop/src/blocks/pullquote/pullquote.js#L204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧐 Needs: Developer 🔥 Product bug A bug which is not directly related to a custom child theme.
Projects
None yet
Development

No branches or pull requests

2 participants