Home › Forums › WoodMart support forum › ‘The preview could not be loaded’ when trying to edit HTML blocks
‘The preview could not be loaded’ when trying to edit HTML blocks
- This topic has 3 replies, 2 voices, and was last updated 2 years, 6 months ago by Artem Temos.
-
AuthorPosts
-
May 6, 2022 at 7:01 am #373528
luxurybrandbrokersParticipantI am getting an error when trying to edit HTML blocks with Elementor. I get the error:
The preview could not be loaded. We’re sorry, but something went wrong…’
I have tried all the suggested ways to fix the issue but it’s still not working. WordPress, Woodmart and all plugins are up-to-date. I’ve tried disabling all other plugins. Checked all hosting settings, etc. It was working when I was building the site on my staging domain. It’s now on actual domain luxurybrandbrokers.com and now it’s not working. I’ve checked all settings and also site and WP urls. Please can you advise how to fix this issue.May 6, 2022 at 9:22 am #373554
Artem TemosKeymasterHello,
Thank you so much for purchasing our theme and contacting our support center.
Please, disable all external plugins and switch to the parent theme. Then check how it works. If the issue persists, please, keep everything turned off and let us check the problem.
Kind Regards
XTemos StudioMay 6, 2022 at 6:20 pm #373773
luxurybrandbrokersParticipantThank you for your quick reply. I tried what you suggested and it worked. I then narrowed it down and found that the problem in the child theme was with some of the code I added in the functions.php to add the SKU at the end of the URL. It worked but caused the issue with editing HTML blocks with Elementor. The code is below. Do you have any suggestions on why it would conflict or is there a way to exclude the HTML Block post type from it?
/**
* WooCommerce – adds SKU in product URL from wordpress.stackexchange.com/questions/3507/custom-field-values-in-permalink/3517#3517
*/function lbb_custom_meta_permalink( $link, $post ){
$post_meta = get_post_meta( $post->ID, ”, true );
if( empty( $post_meta ) || !is_string( $post_meta ) )
$post_meta = ”;
$link = str_replace( ‘!!custom_field_placeholder!!’, $post_meta, $link );
return $link;
}add_filter( ‘post_link’, ‘lbb_custom_meta_permalink’, 10, 2 );
function append_sku_string( $link, $post ) {
$post_meta = get_post_meta( $post->ID, ‘_sku’, true );
if ( ‘product’ == get_post_type( $post ) ) {
$link = $link . ‘#’ .$post_meta;
return $link;
}
}
add_filter( ‘post_type_link’, ‘append_sku_string’, 1, 2 );May 9, 2022 at 8:59 am #374134
Artem TemosKeymasterHello,
Unfortunately, we don’t know why this code conflicts with Elementor and HTML blocks. Fixing 3rd party code is out of our theme support scope.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register