• I’ve been developing a new website over the past two days using Gutenberg — just the bare bones to start with. Here’s a list of issues I’ve encountered so far:

    • By far the most annoying feature: any and all attempts I make to edit the html of the blocks (eg. to change the sizes of fonts or the min-height attribute of background images) result in the block ‘breaking’ and my being shut out of further editing. The post/page editor then presents me with the option to ‘Attempt Block Recovery’, which removes all of my editing and restores the block to the default size/font/font-size/colour. This is made much worse by the fact that all the default designs are awful — the banners and combined text/images are enormous and ugly. Trying to add a simple banner image with readable text over the top requires a lot of direct adjustments — which are then immediately rejected by the editor.
    • Contextual menus are inconsistent in their layout and options. It’s completely unclear to me why sometimes I can edit the html of a block while at other times that option simply isn’t there. Same with options to change the style of text, use a block as a template part or ‘Reuseable’, and more besides.
    • It’s almost impossible to add a block in between two existing blocks — the contextual cue (a ‘+’ sign) just doesn’t appear half the time. Instead, I’ve found I have to add new blocks at the bottom and then move them up the page step by step.
    • What the page/post looks like in the editor is a very poor indication of what it will look like once published.
    • Editing one template under ‘Appearance’ will sometimes change the appearance of a different template. At one point I was stuck with two logo headers appearing on my front page. If I deleted one, no logo header at all would appear on single blog posts. If I added one back to the single blog post page, it would add a second one to my front page.
    • Similarly, on any page with a large number of blocks which are duplicated (eg. when you want to enclose each text block within a div using code blocks), Gutenberg will add its own duplications seemingly at random.
    • Normal javascript doesn’t work, even with the WPCode snippet plug-in. Each piece of script has to be edited, eg. so that you use ‘jQuery’ in place of $. (I’m guessing this is a more general WordPress issue rather than a Gutenberg-specific one, but the same code still works on my older WordPress sites).
    • The pop-up site navigation menu, by default, flows outside the screen on mobiles. Even after overwriting huge chunks of the stylesheet I can’t get it into the centre, or find any way to make it look neat.
    • I can’t easily control the spacing on the website, even by overwriting the theme stylesheet with my own because Gutenberg blocks add margins in as part of the element (eg. “margin-top: var(–wp–preset–spacing–50);”). The only workaround I can figure out is to customise other blocks with negative margins.

    I’ve spent an inordinate amount of time asking myself “What the hell were they thinking?” Most of the above problems aren’t bugs — they’re features of Gutenberg designed to prevent amateur coders making adjustments.

    The main thing I want is to be able to easily edit all the features of every block I add, either with a comprehensive menu (including font changes, margins, dimensions etc) or by being able to edit the html without blocks declaring themselves ‘broken’. It’s bizarre that Gutenberg seems determined to fight me every step of the way on this.

    • This topic was modified 11 months, 2 weeks ago by focksbot.
    • This topic was modified 11 months, 2 weeks ago by focksbot.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The post/page editor then presents me with the option to ‘Attempt Block Recovery’, which removes all of my editing and restores the block to the default size/font/font-size/colour.

    Hi @focksbot may I ask which block did you edit and what kind of HTML code did you add? Depending on your code changes, the block editor might no longer recognize the original block. This would lead to the option to attempt block recovery, if you want to keep the HTML code you can try to convert the block to HTML.

    Screenshot 2023 05 11 at 16 55 49

    However, for blocks with text it should be possible to change color, size etc. Are you able to copy and example of the HTML code that is returning this error?

    Additionally, which blocks were missing the option to Edit in HTML?

    t’s almost impossible to add a block in between two existing blocks — the contextual cue (a ‘+’ sign) just doesn’t appear half the time.

    Yes, sometimes the inserter is hard to find. There is an open issue on GitHub requesting an enhancement to improve block insertion. Please feel free to go over it and add your experience.

    https://github.com/WordPress/gutenberg/issues/42200

    Let me know if you need assistance with this.

    What the page/post looks like in the editor is a very poor indication of what it will look like once published.

    Are you able to provide more information about this, screenshots might be very helpful as well. You can add them to https://snipboard.io/ the site will provide a new link after each upload which you can share with us here.

    Editing one template under ‘Appearance’ will sometimes change the appearance of a different template. At one point I was stuck with two logo headers appearing on my front page. If I deleted one, no logo header at all would appear on single blog posts.

    On the template that was showing two headers, were these headers displayed in the editor ? If you check the templates list view do you see the two headers?

    Additionally, were you deleting the actual header template or just removing it from your template in the site editor?

    Concerning the duplicated blocks were these created using CoBlocks or another plugin. How did you duplicate the blocks?

    Are you able to provide more information about the JavaScript you are trying to add that isn’t working. Are you old sites using the same theme as the one you have on this site?

    How the menu is positioned is usually determines by the theme you are using, what kind of theme are you using and does the issue persist with the one of the default Twenty * themes?

    Thread Starter focksbot

    (@focksbot)

    Hi @focksbot may I ask which block did you edit and what kind of HTML code did you add?

    One example is adding an id to a div in the code, so that I can use it as an anchor link. Another is altering the text size from a figure in pixels to a ‘vw’ value so that the text changes size to fit in different-sized browser windows.

    However, for blocks with text it should be possible to change color, size etc.

    In normal paragraph blocks in the Twenty Twenty-Three theme I can’t see any option to change the text beyond bold, italic, link, and then a dropdown that gives the option of strikethrough, subscript or superscript. For text in pattern blocks which combine text with images I can’t find even those options.

    Are you able to provide more information about this, screenshots might be very helpful as well.

    One very obvious way in which it’s unrepresentative is if I use different fonts. I can’t find *any* option to change the font of the theme anywhere in the dashboard or editor, so I load them in through a child theme and a custom style sheet. I can only check that they’re working using the preview option. For some block styles (eg. the quote block), the default style when published is completely different to what you can see in the block editor.

    On the template that was showing two headers, were these headers displayed in the editor ? If you check the templates list view do you see the two headers?

    The additional header would appear in the editor, yes. I saved the ‘Single’ template, then opened the ‘Home’ template to find an additional header image had appeared in it. I deleted this, went back to the ‘Single’ template, and it had deleted the header image I had previously placed at the top of that. I put it back, and this time it didn’t add the additional header to the ‘Home’ template.

    Additionally, were you deleting the actual header template or just removing it from your template in the site editor?

    The header is a block I was adding to/removing from each template.

    Concerning the duplicated blocks were these created using CoBlocks or another plugin. How did you duplicate the blocks?

    I didn’t use additional plug-ins. In the block editor, I selected the block, then the drop-down menu and selected ‘duplicate block’. I then moved the duplicated block down. When I went back up, sometimes an additional duplicated block had been created. I turned one block into a ‘Reuseable block’ and at one point found that the editor had added a copy of this particular block below every copy of another reuseable block I had made.

    Are you able to provide more information about the JavaScript you are trying to add that isn’t working. Are you old sites using the same theme as the one you have on this site?

    window.onload = checkShelf()
    
    $(window).scroll(function(){
       checkShelf();
    })
    	
    $(window).resize(function(){
       checkShelf();
    })
    
    function checkShelf() {
    	var pageTop = $(document).scrollTop()
    	var pageBottom = pageTop + $(window).innerHeight()
    	var distance = ($(window).innerHeight()) * 0.05
    	var tags = $(".shelf")
    	
    	
    	
    	for (var i = 0; i < tags.length; i++) {
    		var tag = tags[i]
    		if ($(tag).offset().top < (pageBottom - distance)) { 
    			$(tag).addClass("visible")
    		} else {
    			$(tag).removeClass("visible")
    		}
    	
    	}
    } 
     

    Even in this window, having pasted the code above, I now cannot add a paragraph between the quote from your post and the code block! The above code is being used on a WordPress website using the Twenty Twenty-Two theme — I import it using the header.php file. However, the same code does not work when I use it as a snippet with the WPCode plugin. After a lot of experimenting I found that I had to wrap the entire code inside the following:

    jQuery(document).ready(function($) {
    
    })

    Here’s another piece of JS I use elsewhere:

    $(function() {
      $('a[href*="#"]:not([href="#"])').click(function() {
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
          var target = $(this.hash);
          target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
          if (target.length) {
            $('html, body').animate({
              scrollTop: target.offset().top
            }, 1000);
            return false;
          }
        }
      });
    });

    And here’s what I’ve had to change it to to get it to work on the new WordPress site.

    jQuery(function($) {
      $('a[href*="#"]:not([href="#"])').click(function() {
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
          var target = $(this.hash);
          target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
          if (target.length) {
            $('html, body').animate({
              scrollTop: target.offset().top
            }, 1000);
            return false;
           }
        }
      });
    });

    How the menu is positioned is usually determines by the theme you are using, what kind of theme are you using and does the issue persist with the one of the default Twenty * themes?

    I’m using Twenty Twenty-Three. It was the first thing I noticed when I tested it on mobile before making any alterations or adding a child-theme — the drop-down menu starts with an option on the far right of the screen, and the other options can’t be reached because they were outside the width of my mobile screen. I’ve used the child theme style sheet to make heavy alterations to try to make the menu centered, but it somehow still has a bias towards the right of the screen:

    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    	
    flex-direction: row-reverse;
    	
    }
    
    @media screen and (max-width: 600px) {
    
    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
    .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open,
    .wp-block-navigation__responsive-close {
    	
    text-align: left;	
    	
    }
    
    .wp-block-navigation__responsive-close {
    	
    width: 100%;
    	
    }
    	
    .is-menu-open .wp-block-navigation__responsive-dialog {
    		
    text-align: center;
    		
    }
    	
    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list {
    	
    	
    align-items: center;
    	
    	}
    	
    }
    
    .wp-block-navigation__responsive-container-close {
    
    position: static;
    right: auto;
    left: auto;
    	
    }
    
    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list {
    	
    	
    justify-content: space-evenly;	
    	
    }
    

    I’ve encountered an additional bug today: when editing a page in the html editor it simply deleted all of the page below the paragraph I was editing. The only way I could save my work was to copy the changes I’d made onto a clipboard and then exit the editor without saving, so I could reload the earlier version.

    One example is adding an id to a div in the code, so that I can use it as an anchor link. Another is altering the text size from a figure in pixels to a ‘vw’ value so that the text changes size to fit in different-sized browser windows.

    Hi @focksbot for adding anchors, I tried this on my site and it worked as expected. I try to edit a paragraph in HTML, then I added <p id="anchor-link-example"> Examle paragraph text</p> I then added anchor-link-example as a link on another paragraph using the link option found on the blocks toolbar. This worked as expected, is this how you are doing it as well?

    For font size changing values and other settings, I would suggest using the block setting options shown in the article below:
    https://wordpress.org/documentation/article/typography-settings-overview/

    One very obvious way in which it’s unrepresentative is if I use different fonts. I can’t find *any* option to change the font of the theme anywhere in the dashboard or editor

    What kind of font do you want to change to, if you are in the site editor there is a Global Styles option which you can use to change the font for your whole site:
    https://wordpress.org/documentation/article/styles-overview/

    Additionally, to add other fonts I would suggest using a plugin called the Create Block Theme plugin. When the plugin is active you can go to Appearance > Manage Font to add local fonts or install any Google font you like.
    https://wordpress.org/plugins/create-block-theme/

    The issues you are having concerning the headers and JavaScript sound like they might be theme related, I am not very sure. You mentioned that you are using a child theme, I would suggest creating a child theme using the plugin I mentioned above Create Block Theme plugin, are the issues persistent when you create a child theme in this way?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Still buggy and unintuitive’ is closed to new replies.