Title: Dennis Snell's Replies | WordPress.org

---

# Dennis Snell

  [  ](https://wordpress.org/support/users/dmsnell/)

 *   [Profile](https://wordpress.org/support/users/dmsnell/)
 *   [Topics Started](https://wordpress.org/support/users/dmsnell/topics/)
 *   [Replies Created](https://wordpress.org/support/users/dmsnell/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/dmsnell/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/dmsnell/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/dmsnell/engagements/)
 *   [Favorites](https://wordpress.org/support/users/dmsnell/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 31 total)

1 [2](https://wordpress.org/support/users/dmsnell/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/dmsnell/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/dmsnell/replies/page/2/?output_format=md)

 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [“POST /wp-admin/admin-ajax.php HTTP/2.0” 404](https://wordpress.org/support/topic/post-wp-admin-admin-ajax-php-http-2-0-404/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/post-wp-admin-admin-ajax-php-http-2-0-404/#post-18598049)
 * [@garrigan](https://wordpress.org/support/users/garrigan/) I believe that the
   404 is known and pointed out twice in the linked Trac ticket. You can watch [Core-54435](https://core.trac.wordpress.org/ticket/54435)
   if you want to be notified of updates on that one.
 * I’m afraid I’m going to be limited in how much I can help you diagnose your particular
   issues, but maybe someone else with more helpful skills can help you figure this
   out. That being said, I’ll see updates here so if I notice something that makes
   sense I can jump in.
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [“POST /wp-admin/admin-ajax.php HTTP/2.0” 404](https://wordpress.org/support/topic/post-wp-admin-admin-ajax-php-http-2-0-404/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/post-wp-admin-admin-ajax-php-http-2-0-404/#post-18597861)
 * [@garrigan](https://wordpress.org/support/users/garrigan/) here’s a more complete
   patch to apply to see the errors. if you make this change, it should show the
   output on the rendered page in the browser and you should be able to copy/paste
   it from your browser to here to show the full error and stack trace.
 *     ```wp-block-code
       function wp_check_invalid_utf8( $text, $strip = false ) {	if ( ! is_string( $text ) ) {		echo "<plaintext>";		var_dump( $text );		echo "\n\n\n------------\n\n\n";		var_dump( debug_backtrace() );		die();	}	$text = (string) $text;	...}
       ```
   
 * Thanks for your diligence in getting this information. It’s just a bit thorny
   trying to dig through what I think might be the server access logs
 *   Forum: [Installing WordPress](https://wordpress.org/support/forum/installation/)
   
   In reply to: [“POST /wp-admin/admin-ajax.php HTTP/2.0” 404](https://wordpress.org/support/topic/post-wp-admin-admin-ajax-php-http-2-0-404/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/post-wp-admin-admin-ajax-php-http-2-0-404/#post-18594761)
 * [@garrigan](https://wordpress.org/support/users/garrigan/) if you add the lines
   mentioned in the Trac ticket to the top of the `wp_check_invalid_utf8()` function
   inside `wp-includes/formatting.php`, then repeat the issue that caused the 404,
   then it should print the data on the webpage somewhere (and this will likely 
   be messed up. if you want, do this instead `var_dump( "<plaintext>" ); var_dump(
   $text )`) and it should still break the displayed page but be easier to see the
   output.
 * the `Error` should produce a log message in [the same place you saw the error above](https://wordpress.org/support/topic/post-wp-admin-admin-ajax-php-http-2-0-404/#post-18321626).
 * Here’s a big warning though: don’t do this on a production site. Only do this
   is you are able to test the changes without interruption your own site or someone
   else’s.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Why is the WordPress Block code so verbose and inefficient?](https://wordpress.org/support/topic/why-is-the-wordpress-block-code-so-verbose-and-inefficient/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/why-is-the-wordpress-block-code-so-verbose-and-inefficient/#post-17233937)
 * > Yes, you’re right that other assets will be much larger than the block code,
   > but those assets can also often be lazy-loaded separately and aren’t as critical
   > for UX and Core Web Vitals (FCP, first-byte) as the initial HTML page, which
   > loads the main content the user is interested in.
 * In review I could have been clearer in stressing that this duplication isn’t 
   present on the rendered page. The HTML comments and their JSON attributes are
   stripped away when rendering, styles are merged, and for some blocks the entire
   content is swapped out when building an actual page.
 * What I was trying to convey was that in terms of the delivered page, WordPress
   and its block content performs quite well. Here’s a 2021 article discussing how
   [block posts score high in the browser](https://wptavern.com/gutenbergs-faster-performance-is-eroding-page-builders-dominance)
   for performance and for mobile accessibility.
 * > But even more importantly, it takes much longer to write the code! I love utility-
   > style class names for how quickly and efficiently you can build layouts, and
   > I wish WP had them too (side note: for my sanity I might even write a script
   > that takes my Tailwind HTML code and auto-converts it to WP block code wherever
   > possible!)
 * It’s easy to sympathize with this, but the systems are different and you may 
   find that there are also alternative ways to develop that eliminate that coding
   altogether.
 * For instance, if you haven’t explored them, check out [Block Patterns](https://wordpress.org/documentation/article/block-pattern/).
   The combination of creating a block pattern and using the Group Block effectively
   can be a quick way to build reusable micro-layouts in your posts, and that doesn’t
   involve any code at all. The benefits of the ecosystem come with it too; for 
   example, when building columns there’s an option to check that transforms columns
   into a vertical list of each column on mobile displays so that it avoids awkward
   horizontal scrolling.
 * > thank you again for the answers. Have a great day
 * Glad to try and clarify! You have a great day as well.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [I updated my php version to 7.0 and it shows critical error](https://wordpress.org/support/topic/i-updated-my-php-version-to-7-0-and-it-shows-critical-error/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/i-updated-my-php-version-to-7-0-and-it-shows-critical-error/#post-17233927)
 * [@byam21](https://wordpress.org/support/users/byam21/) I looked at the link you
   shared and it’s currently showing PHP 7.4 _with_ mysql support. Also I checked
   your site and it appears to be working. Did you figure this out? Or maybe your
   host was slow to update their configuration?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Submit Buttons no longer display on existing site](https://wordpress.org/support/topic/submit-buttons-no-longer-display-on-existing-site/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/submit-buttons-no-longer-display-on-existing-site/#post-17233916)
 * Great! Glad to hear you figured this out through a plugin update. I just checked
   and saw that the form fields are back.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Why is the WordPress Block code so verbose and inefficient?](https://wordpress.org/support/topic/why-is-the-wordpress-block-code-so-verbose-and-inefficient/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/why-is-the-wordpress-block-code-so-verbose-and-inefficient/#post-17228247)
 * Hi [@kittenchief117](https://wordpress.org/support/users/kittenchief117/). These
   are good questions and there’s a big answer to them; here’s a not-so-brief summary.
 * The most important part to understanding this is probably that WordPress is trying
   to build an open and extensible system. Most of the decisions related to the 
   way content is stored is directly working to one of those two goals.
 * > more brief and concise code means: faster to write, less network bytes consumed,
   > efficient browser parsing/rendering/reflow performance, easier to read/maintain,
   > more productivity, and better Developer Experience (DX).
 * WordPress posts tend to perform quite well in rendered pages and there’s been
   a fair amount of care built into the editor in order to produce semantic and 
   efficient HTML. One part to note is that the content stored in a post is not 
   the same content delivered to the browser. In any case, the extra metadata stored
   with each block is rather minor, and a single image upload to a site might outweigh
   the total of all the additional data surrounding blocks.
 * Those HTML comments provide a very fast way to parse the blocks out of a post
   and to isolate them for processing on page render without requiring the use of
   more opaque data structures like a proprietary JSON format. They provide for 
   sufficient functionality when rendered as an HTML file without any server while
   communicating the higher-level attributes which define what any given block is
   and means.
 * For a deeper dive into this question, you can read more in [an article I wrote](https://fluffyandflakey.blog/2017/09/04/gutenberg-posts-arent-html/)
   many years ago now.
 * > Many styles are duplicated first in the WP block comment, and then in the actual
   > tag itself. Why? Can’t we just write Tailwind-like styles…Why not use that 
   > instead of `"orientation":"vertical"`?
 * Duplication should be kept at a minimum, but if you look carefully at the example
   you posted you will see that there are minor differences. A Block represents 
   a kind of rich media and its attributes define the parameters which define that
   particular bit. An image block’s `url` attribute indicates where to find an image
   file, but the HTML that’s rendered for that block could be one of many different
   HTML constructions depending on things like whether there are different sizes
   available for display, whether there’s a caption, whether there are artistic 
   choices being made based on the screen size. Styling is similar in that there
   are concepts being defined at a higher lever than raw CSS. There’s a close correspondence,
   but CSS becomes a way to express the higher-level style _kind_. Therefore most
   block’s have attributes indicating the intentional styles while the HTML inside
   a block contains the realization of that style with CSS.
 * It’s common when developing blocks to add CSS late during render and to do that
   based on the block attribute or based on some other information available to 
   the server when rendering a page. If you examine the rendered page you will note,
   for instance, that most blocks contain a number of additional classes which aren’t
   stored with the block in the editor or in the database. WordPress provides [the `render_block` filter](https://developer.wordpress.org/reference/hooks/render_block/)
   to modify the HTML when sending a page to a browser.
 * > Also, more complicated styles not supported by the WP editor…have to be added
   > to Blocks with CSS class names I think, which are then harder for normal users
   > to identify and remove one if they want to.
 * If you find that you are adding things routinely to _many_ blocks then you might
   look into that `render_block` filter and see if it’s something that you can provide
   dynamically.
 * Many of the style systems are designed to work together with [Global Styles](https://wordpress.com/go/web-design/everything-you-need-to-know-about-wordpress-global-styles/)
   and block supports that give people the ability to adjust the layout or visual
   styling of a block or page without resorting to code or CSS. This is also one
   of the reasons it’s hard to rely entirely on CSS, because the WordPress concepts
   often transcend an individual block in a post or an individual setting.
 * Everything being built is done in the open and in a spirit of cooperation and
   invitation. If you experience specific problems or want to share an idea for 
   how to do things differently, you can interact on [the Issues page](https://github.com/WordPress/gutenberg/issues)
   for Gutenberg (the name of the editor).
 * Thanks for asking!
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [How to tell wp-env that my project is a theme?](https://wordpress.org/support/topic/how-to-tell-wp-env-that-my-project-is-a-theme/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/how-to-tell-wp-env-that-my-project-is-a-theme/#post-17228213)
 * It looks like that warning has been there a long time. I’m not sure why it was
   added the way it was, but it could be simply that this scenario didn’t come up
   when developing it.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [How to tell wp-env that my project is a theme?](https://wordpress.org/support/topic/how-to-tell-wp-env-that-my-project-is-a-theme/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/how-to-tell-wp-env-that-my-project-is-a-theme/#post-17223102)
 * [@bubokko](https://wordpress.org/support/users/bubokko/) after some experimentation
   I’m also seeing that error message, but it also appears to be working. That is,
   even though it prints that warning, it’s still mounting my theme the way I expect
   it to. I installed 6.4.1 and then copied the `twentytwentyfour` theme into a 
   new directory, then I renamed the theme to `twentytwentyfourohfour` just to make
   sure it wasn’t loading a theme from the `wp-env` contents.
 * So you might double-check and see if it’s working for you. That warning shows
   up whenever it doesn’t find a `.wp-env.json` file, even if it finds themes and
   plugins, which I confirmed by digging into `wp-env` directly. I think it would
   make sense to show something clearer like `Found the "twentytwentyfour" theme.`
 * I’ve [proposed an update to `wp-env` to clarify the warning](https://github.com/WordPress/gutenberg/issues/56457)
   message.
    -  This reply was modified 2 years, 10 months ago by [Dennis Snell](https://wordpress.org/support/users/dmsnell/).
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [items on Menu aren’t showing using Block Editor](https://wordpress.org/support/topic/items-on-menu-arent-showing-using-block-editor/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/items-on-menu-arent-showing-using-block-editor/#post-17222871)
 * Oh darn. As a second-check, did you look in the header template editor in the
   Elementor configuration? I believe the problem is that _somewhere_ in there Elementor
   is replacing the WordPress menu.
 * It may be helpful to reach out to Elementor support as well.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [How to tell wp-env that my project is a theme?](https://wordpress.org/support/topic/how-to-tell-wp-env-that-my-project-is-a-theme/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/how-to-tell-wp-env-that-my-project-is-a-theme/#post-17222764)
 * [@bubokko](https://wordpress.org/support/users/bubokko/) is the directory with
   your code posted somewhere? what does the list of files in the project root look
   like?
 * If you only have theme files then yes, it should find the `style.css` file and
   look for the header there.
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [Can’t find a page](https://wordpress.org/support/topic/cant-find-a-page-2/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/cant-find-a-page-2/#post-17222752)
 * [@trinityny](https://wordpress.org/support/users/trinityny/) that should be in
   your Pages menu with id 22928 and the title “Youth.” There could be filters activated
   in the list of pages, or there could be enough pages that you need to click to
   load the next group of pages, or it’s possible that your user account doesn’t
   have access to see it (check with your site admin if that’s the case).
 * You can try [navigating directly to that page](https://www.trinityny.org/wp-admin/post.php?post=22928&action=edit)
   but this link will only work if you’re logged in and able to edit the post. It’s
   also possible that the server is setup in a way that it doesn’t work. Let’s give
   it a try.
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [items on Menu aren’t showing using Block Editor](https://wordpress.org/support/topic/items-on-menu-arent-showing-using-block-editor/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/items-on-menu-arent-showing-using-block-editor/#post-17222736)
 * Hi [@cutenmore](https://wordpress.org/support/users/cutenmore/). It looks like
   your site is currently showing a menu built in Elementor. You may want to check
   in the Elementor [docs for the Menu widget](https://elementor.com/help/the-menu-widget/)
   or in the ElementorKit addon’s [docs for its nav menu](https://wpmet.com/doc/nav-menu/)
   component. They are probably replacing the menu from WordPress and it looks like
   they have their own interface to edit it.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Error establishing a database connection](https://wordpress.org/support/topic/error-establishing-a-database-connection-1069/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-1069/#post-17222690)
 * Hi [@gottfrieds](https://wordpress.org/support/users/gottfrieds/). The second
   part of that username is the name of the web host server which is attempting 
   to connect. Databases can limit access not only to a username and password, but
   also to specific allowed servers.
 * Do you have access to your hosting configuration’s database settings? Try comparing
   the username and password to [the values in `wp-config.php`](https://developer.wordpress.org/apis/wp-config-php/#default-wp-config-sample-php).
   If need be, it should be possible to perform a reset on the database username
   and password and then update that file.
 * Your site seems okay when viewing it, but it looks like it’s being served from
   a WP-Optimize caching plugin, which lets it bypass the database.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [How to tell wp-env that my project is a theme?](https://wordpress.org/support/topic/how-to-tell-wp-env-that-my-project-is-a-theme/)
 *  [Dennis Snell](https://wordpress.org/support/users/dmsnell/)
 * (@dmsnell)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/how-to-tell-wp-env-that-my-project-is-a-theme/#post-17222677)
 * [@bubokko](https://wordpress.org/support/users/bubokko/) you can create a `.wp-
   env.json` file in the root directory of your project and explicitly declare that
   it’s a theme. See [the config file documentation](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/#wp-env-json)
   for help setting that up.
 * As a side note, if you have a theme file make sure it has the [required header](https://developer.wordpress.org/themes/core-concepts/main-stylesheet/#file-header)
   at the top of the theme so that WordPress will know what it is.

Viewing 15 replies - 1 through 15 (of 31 total)

1 [2](https://wordpress.org/support/users/dmsnell/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/dmsnell/replies/page/3/?output_format=md)
[→](https://wordpress.org/support/users/dmsnell/replies/page/2/?output_format=md)