-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Front end output for backgrounds? #17
Comments
The plugin update is long due pending for compatibility with new changes to the editor. We are working on update that will fix the issue. |
Good to hear! I wish I could help but my JS skill is not up to snuff. Would be happy to help test, let me know. |
@alkah3st tested on the latest WordPress release group block with background image and its working fine. May be nested child block background color is overlapping on the image. |
Let me try downloading the plugin via git rather than the WP repo, because when I apply a background image to a group block (nothing inside it except a Heading or a paragraph), no image is attached in the Dashboard, and nothing is output on the block markup on the front end. Although the image does show as uploaded to the block, in the sense that it's clear I selected an image in the block settings. (I'm on 5.4, and this is using the default TwentyNinteen theme.) Would you like me to send a screenshot? |
Yeah, if I try to download the plugin from your repo, it looks like I need to do some sort of compilation for it to work. I get errors on every Gutenberg screen: Warning: filemtime(): stat failed for F:\Websites\redis\wp-content\plugins\block-background/build/script.js in F:\Websites\redis\wp-content\plugins\block-background\block-background.php on line 184 and Warning: filemtime(): stat failed for F:\Websites\redis\wp-content\plugins\block-background/build/style.css in F:\Websites\redis\wp-content\plugins\block-background\block-background.php on line 192 The version on the WP repo works fine but again it doesn't output anything on any block on the front end, such as the path to the attached image. |
Here is an example of what I see on my end, using the plugin that's on WP's repo: |
So oddly, I did ultimately manage to get the backgrounds to appear by creating an entirely fresh page and starting from scratch. I think there's something strange going on with existing pages that already have blocks in place. If you publish a Group block but don't have the plugin yet installed, then activate the plugin and try to add a background, none is output on the front end, even though it appears in Gutenberg. Only by adding a background color, detaching the image, and then re-attaching the image can I get it to output the image on the front end. Maybe the way it saves the selection is wonky if the block already pre-exists? |
The new Group block sorely needs the ability to attach a background image to it, and this plugin would be a great solution. While it still works within Gutenberg (that is, you can assign gradients, background colors, and background images in the Gutenberg editor), it doesn't output anything on the blocks in the front end. Do I need to do something to initiate that?
The text was updated successfully, but these errors were encountered: