• Resolved JP3

    (@jp3)


    Hello. Thanks for the awesome plugin! I’ve been using it on several sites and have made it a standard go-to plugin I use by default on almost every site I own/develop.

    I’ve run across an issue with one site that I haven’t figured out yet.

    Gutentor does not work in the visual customizer for widgets.

    I’m developing a one-page theme that uses standard template files at the core, with each “section” of the one-page site being its’ own widget area. When I try to add stuff to those widget areas in the visual editor, none of the settings are saved. The Guntentor blocks get added and render, but any customizations I make to them (fonts, colors, sizes, etc) do not get saved or applied to the Gutentor blocks. They only ever show the default Gutentor block with default settings.

    It appears to be working properly in pages in the standard Gutenberg editor, but not the Widgets visual editor. It does not work in the admin panel when editing, or the front end when rendering.

    Looking at the code produced in the page where the widget areas are rendered, there are no assets loaded, and no CSS applied to Gutentor blocks. If I do a standard page without widget areas, it works fine.

    I’ve gone through settings to ensure settings were good. “Global Resources Load” and “Optimizes CSS” seem to have no effect.

    Is there something I should add to my theme to make Gutentor compatible with widget area visual editor (theme customizer, not full-site-editing)? Or is this a bug that needs to be worked out?

    • This topic was modified 2 years, 9 months ago by JP3.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter JP3

    (@jp3)

    Just found more clarifying info:

    I’ve added theme support for
    ‘widgets’,
    ‘widgets-block-editor’,
    ‘core-block-patterns’,
    ‘wp-block-styles’ and
    ‘html5’ ( for ‘comment-list’, ‘comment-form’, ‘search-form’, ‘gallery’, ‘caption’, ‘style’, ‘script’ )

    1.) In the wp-admin panel, going to Appearance -> Widgets:
    Gutentor seems to be applying custom settings just fine, saving them, and displaying on the front-end properly.

    2.) In Appearance -> Customize -> Widgets -> per-widget-area:
    Gutentor applies saved values from method 1 above, but any changes revert it back to Gutentor defaults, and on save (“Publish”), saves default values over custom ones. Of course then the front-end is rendering default styles.

    Until this is worked out, I’m sticking with method 1.

    If needed, I can set you up with an account on the dev site for this.

    Plugin Contributor codersantosh

    (@codersantosh)

    Hello @jp3 ,

    I just quick check and found that CSS not working on Customizer.
    We will look into this in the updates. Thanks for letting us know about this.

    Best Regards!

    Thread Starter JP3

    (@jp3)

    Got another strange scenario doing the same thing. Possibly related.

    I created a custom post_type that uses the Gute’ editor and Gutentor blocks.

    Admin panel displays them proper. Front-end renders them proper.
    Standard archive and singles render properly.

    Using those same posts from that same post_type in a custom WP_Query loop in the main index.php (or any other template file) looses custom styles, and no assets for Gutentor are loaded. Even with “global loading” enabled. Just like the widget scenario above.

    Thanks for the attention on this.

    Plugin Contributor codersantosh

    (@codersantosh)

    Hello @jp3 ,

    Gutentor saved CSS in the static files per page/post. The actual content and CSS are saved in different places, which is different from other regular blocks.

    You can use the following code to display CSS on the loop.

    $style = get_post_meta( $post_id, 'gutentor_dynamic_css', true );
    echo "<!-- Dynamic CSS -->\n<style type=\"text/css\" id='gutentor-used-block-$post_id'>\n" . wp_strip_all_tags( $style ) . "\n</style>";

    We have done the same thing on Gutentor Widget. You can view the whole file for the reference.

    Best Regards!

    Thread Starter JP3

    (@jp3)

    Cheers for that code snippet! Total Lifesaver!

    Awaiting a fix for the customizer styling soon. No rush. I can work around it for now, but others may want/need it more than me.

    Thread Starter JP3

    (@jp3)

    Just downloaded the latest update and can confirm that the original issue with “Appearance -> Customize -> Widgets -> per-widget-area” is resolved.

    Marking as resolved!

    Just Awesome! Confirms my reasons for using this plugin as a standard go-to for every site I develop ??

    Plugin Contributor codersantosh

    (@codersantosh)

    Hello @jp3 ,
    I am happy to know Gutentor is useful for you ?? If you find any further issues feel free to add a support thread. If you want, you can leave us a review ??

    Best Regards!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Gutenberg Widget Visual CustomizerSupport?’ is closed to new replies.