• I have a wordpress installation on multiple domains, it is available within an intranet with HTTP and on a HTTPS domain for the Internet, with strict transport security. While there is a redirect for HTTP to HTTPS on the HTTPS domain the strict transport security make browsers fail to load some CSS because it isn’t secure.

    I found these problems in the HTML source WordPress generates…

    <link rel='stylesheet' id='wp-block-library-css'  href='https://wpsite.redacted/wp-includes/css/dist/block-library/style.min.css?ver=5.4.1' media='all' />
    <link rel='stylesheet' id='wc-block-style-css'  href='https://wpsite.redacted/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/style.css?ver=2.5.16' media='all' />
    <link rel='stylesheet' id='photoswipe-css'  href='https://wpsite.redacted/wp-content/plugins/woocommerce/assets/css/photoswipe/photoswipe.min.css?ver=4.1.1' media='all' />
    <link rel='stylesheet' id='photoswipe-default-skin-css'  href='https://wpsite.redacted/wp-content/plugins/woocommerce/assets/css/photoswipe/default-skin/default-skin.min.css?ver=4.1.1' media='all' />
    <link rel='stylesheet' id='woocommerce-layout-css'  href='https://wpsite.redacted/wp-content/plugins/woocommerce/assets/css/woocommerce-layout.css?ver=4.1.1' media='all' />
    <link rel='stylesheet' id='woocommerce-smallscreen-css'  href='https://wpsite.redacted/wp-content/plugins/woocommerce/assets/css/woocommerce-smallscreen.css?ver=4.1.1' media='only screen and (max-width: 768px)' />
    <link rel='stylesheet' id='woocommerce-general-css'  href='//wpsite.redacted/wp-content/plugins/woocommerce/assets/css/twenty-twenty.css?ver=4.1.1' media='all' />

    The first line of the code above is HTTP instead of HTTPS, and the last line is missing the protocol identifier entirely. There is some kind of bug here, but I am not sure if the bug is a problem with WooCommerce or the TwentyTwenty theme. If someone could tell me where to report the bug, that would be great.

Viewing 1 replies (of 1 total)
  • The id of the stylesheet tells you which code it belongs to, and the href tells you where the file is. Twenty Twenty is not involved in any of those.
    Only the first one is the WP standard block CSS. The rest are Woocommerce.

    But it doesn’t necessarily mean that the plugin or WP is doing something wrong. It could be that your configuration is not quite right. There is code in core to determine the scheme to use, and millions of existing sites that are working correctly.

    By the way, the last one is intentionally agnostic. It should work on either.

Viewing 1 replies (of 1 total)
  • The topic ‘Errors with stylesheet links in either WooCommerce or TwentyTwenty theme’ is closed to new replies.