You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a setup, where every uploaded image has up to 10 renditions (different dimensions of the same image) depending on the screen and the context, where the image is used. To not always render all images in all renditions, I use a plugin, which only renders and then chaches the renditions of the requested image, the first time, that image url is being requested from the server.
Additionally, I am using the option Theme Template to define all my block contents as part of my theme.
This works well so far, but out of some reason, the first rendering already happens in Edit Mode, when the author saves the page. Therefore, saving a page with several Blocks having images takes a long time and sometimes results in a request timeout.
My Blocks all use the option CODE OUTPUT IN EDITOR with the Value Never display. Still, I see a log Message (placed in my block"s template) in my debug.log after I save the page (Never opened the page in the frontend).
I would expect, that by using the mentioned Option, no Block Rendering occurs in the Edit mode. Is that a Bug or a limitation of wordpress itself, that the block get"s anyway rendered in edit mode?
Lazy Blocks Version: 3.5.1
WordPress Version: 6.3.1
Any helpful information to reproduce the issue (screenshots, code parts)
You can find my test block attached to this ticket, also the php template used for the test block. I have setup a demo site using the wordpress theme twentytwentyone and just one lazy block. If it helps, I could give access to this site to see a live example. lzb-export-blocks-2023-09-30.json.zip block.php.zip
Steps to reproduce
Setup a wordpress
Install Lazy Blocks
Import the attached block
Copy the attached php file and add it in the folder wp-content/themes/twentytwentyone/blocks/lazyblock-test-block/
Enable debugging in your wp-config.php by adding define("WP_DEBUG", true); and define( "WP_DEBUG_LOG", true );
Issue description:
I am using a setup, where every uploaded image has up to 10 renditions (different dimensions of the same image) depending on the screen and the context, where the image is used. To not always render all images in all renditions, I use a plugin, which only renders and then chaches the renditions of the requested image, the first time, that image url is being requested from the server.
Additionally, I am using the option
Theme Template
to define all my block contents as part of my theme.This works well so far, but out of some reason, the first rendering already happens in Edit Mode, when the author saves the page. Therefore, saving a page with several Blocks having images takes a long time and sometimes results in a request timeout.
My Blocks all use the option
CODE OUTPUT IN EDITOR
with the ValueNever display
. Still, I see a log Message (placed in my block"s template) in my debug.log after I save the page (Never opened the page in the frontend).I would expect, that by using the mentioned Option, no Block Rendering occurs in the Edit mode. Is that a Bug or a limitation of wordpress itself, that the block get"s anyway rendered in edit mode?
Lazy Blocks Version: 3.5.1
WordPress Version: 6.3.1
Any helpful information to reproduce the issue (screenshots, code parts)
You can find my test block attached to this ticket, also the php template used for the test block. I have setup a demo site using the wordpress theme twentytwentyone and just one lazy block. If it helps, I could give access to this site to see a live example.
lzb-export-blocks-2023-09-30.json.zip
block.php.zip
Steps to reproduce
wp-content/themes/twentytwentyone/blocks/lazyblock-test-block/
define("WP_DEBUG", true);
anddefine( "WP_DEBUG_LOG", true );
Test Block
debug.log
inwp-content/debug.log
already contains a log entry coming from the block template fileThe text was updated successfully, but these errors were encountered: