Broken css in checkout / cart

Posted in: Newspaper
Post count: 44

Hello, after recent woocomerce updates in the website checkout and cart checkout cart pages seem to be broken, like no css is loaded and something is definatelly not working correctly. reverting back to 12.7.4 did not help. We are at latest newspapper 12.7.5.
Please for your assistance.

Post count: 35449

Hi,
It appears that this situation appears only when the cart is empty and you have something in it the layout is better – https://prnt.sc/4KLP06kqVlos
So what the problem could be is something related to the cache settings, please clear all cache, object cache, purge CDN, and also check when you are logged in if the situation is the same. In case the situation persists, and this is a WooCommerce bug, I will recommend getting the previous plugin version from here – https://wordpress.org/plugins/woocommerce/advanced/ https://prnt.sc/hRD8Lt4wzp-l and update the plugin only after this is fixed by WooCommerce developers.
Thank you!

Post count: 44

Hello,
this statement is wrong ->It appears that this situation appears only when the cart is empty and you have something in it the layout is better – https://prnt.sc/4KLP06kqVlos

about:
o what the problem could be is something related to the cache settings, please clear all cache, object cache, purge CDN, and also check when you are logged in if the situation is the same. -> already did that and disabled caching plugin, cdn confirmed disabled (it was already)

In case the situation persists, and this is a WooCommerce bug, I will recommend getting the previous plugin version from here – https://wordpress.org/plugins/woocommerce/advanced/ https://prnt.sc/hRD8Lt4wzp-l and update the plugin only after this is fixed by WooCommerce developers. -> i did enable and tested up to woocommerce.10.4.3.zip and your theme downgraded to 12.7.2.

neither of these actions solved the issue. i noticed that during the update/downgrade when tagdiv is disabled checkout shows ok as woocomerce default as a block.

i also tried to revert to old shortcode (in this way i saw the page looking good) but our payment provider only supports blocks so i changed back to blocks…

Please for your assistance.
I can send credentials for checking…

Post count: 44

Can you also please provide the file that loads the css for wc-block-checkout /cart so we can check its loaded properlly?

kind regards.

Post count: 44

Hello, update:
after a lot of search and AI tools assistance we used the following funcntions that loads 2 css files that were not loading before (checkout.css,checkout-rtl.css).
We noticed that there are still some minor css issues but at least page is functional.

So please allow me to ask once more. What are the files that should load in checkout/cart with blocks and if you know what can be the issue that they dont load in our case. We dont consider the issue fixed until the cause is located and extra code is removed.

Kind regards,
Alexandros S.
Please do notify a.sklepas@webpoint.gr
thank you.

/**
* Load ONLY WooCommerce Blocks Checkout CSS on Cart / Checkout / Order Received.
* Files:
* – /wp-content/plugins/woocommerce/assets/client/blocks/checkout.css
* – /wp-content/plugins/woocommerce/assets/client/blocks/checkout-rtl.css
*/
add_action(‘wp_enqueue_scripts’, function () {

if ( is_admin() ) {
return;
}

$is_order_received = function_exists(‘is_order_received_page’)
? is_order_received_page()
: ( function_exists(‘is_wc_endpoint_url’) && is_wc_endpoint_url(‘order-received’) );

if ( ! ( is_cart() || is_checkout() || $is_order_received ) ) {
return;
}

$dir = WP_PLUGIN_DIR . ‘/woocommerce/assets/client/blocks/’;
$url = plugins_url(‘woocommerce/assets/client/blocks/’);

// LTR checkout CSS
$ltr = $dir . ‘checkout.css’;
if ( file_exists( $ltr ) ) {
wp_enqueue_style(
‘kynigesia-wc-blocks-checkout’,
$url . ‘checkout.css’,
array(),
filemtime( $ltr )
);
}

// RTL checkout CSS (only if site language is RTL)
$rtl = $dir . ‘checkout-rtl.css’;
if ( is_rtl() && file_exists( $rtl ) ) {
wp_enqueue_style(
‘kynigesia-wc-blocks-checkout-rtl’,
$url . ‘checkout-rtl.css’,
array( ‘kynigesia-wc-blocks-checkout’ ),
filemtime( $rtl )
);
}

}, 100);

Post count: 35449

Hi,
This depends on more factors, on the plugins and template you are using, for example, on our live demo https://demo.tagdiv.com/newspaper_shop_kids_store/checkout/https://prnt.sc/w5yjBwJa2C0G those are the files – https://prnt.sc/DWEI7DKyMvQX
Now those mentioned by you are from the WooCommerce plugin, so not related to the theme; most likely, some extra plugin was interfering with the WooCommerce plugin, and you got those results.
Thank you!

Post count: 44

Hello,
we are aware of what you are mentioning but the issue remains the cart css is still incomplete as visible here: https://prnt.sc/rt54n8Jn5mfR (add remove buttons are definatelly missing css) so we would like to fix the issues.
Before applying the hotfix i mentioned i check your demos, from what i noticed they are all old and none of them (unless mistaken) has block layout … so none of these css are working.
So:
1) can one of you check the reason why this happened on our website or not?
2) please provide a wordpress demo that used block in the checkout so we can check what css files are used in specific.

Kind regards,
Alexandros S.

Post count: 35449

Hi Alexandros, if it is possible to create a dev/staging and provide us access to it, we would be happy to check it. For this, you can contact us via email at contact@tagdiv.com and provide access to the dev/staging environment in the email. We’ll check it as soon as we can. Also, include the link o this topic to can identify you faster.
Thank you!

Post count: 44

Hello,
issue located is here:
https://wordpress.org/support/topic/wp-6-9-yoast-seo-block-editor-css-error/
Downgraded to 6.8.3 (issues as 6.9.x) with latest yoast and now its ok.
Also to mention in some cases latest yoast causes similar issues but downgrading yoast did not fix our issue.
https://wordpress.org/support/topic/yoast-seo-27-0-causes-plugin-css-not-to-load-when-using-shortcodes-regression/

Kind regards,
Alexandros S.
thank you for your support.

Post count: 35449

Hi Alexandros,
I’m glad that you managed the situation and thanks for sharing the solution in this case, so if one of our users has a similar situation, they can check how it can be resolved.
Thank you!

Viewing 10 posts - 1 through 10 (of 10 total)
The forum ‘Newspaper’ is closed to new topics and replies.