• Resolved ddur

    (@ddur)


    Version 4.4.3

    Line 407 in
    \plugins\the-events-calendar\common\src\Tribe\Customizer.php
    echo '<script type="text/css" id="' . esc_attr( 'tmpl-' . $this->ID . '_css' ) . '">';

    Same at line 407 in
    \wp-content\plugins\the-events-calendar\vendor\tickets\common\src\Tribe\Customizer.php

    This can seriously affect minifiers expecting JavaScript within <script> tag.

    + NOT ENQUEUED!
    Why those styles are not properly enqueued with wp_enqueue_style?

    • This topic was modified 8 years ago by ddur.
    • This topic was modified 8 years ago by ddur.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Barry

    (@barryhughes-1)

    Hi @ddur,

    I’m sorry to hear you’ve experienced difficulties ??

    This can seriously affect minifiers expecting JavaScript within <script> tag.

    Script-based templates like this are increasingly common and are extremely useful for us for a number of reasons.

    To avoid issues with minification tools, the best approach is probably to tune and adjust those tools so that they ignore specific elements like the ones you referenced or else switch to a tool that does not attempt to minify scripts which are not declared as containing Javascript.

    I’d love to hear what tool or plugin you are using for this purpose, though, if you’re down to share more information ??

    + NOT ENQUEUED!
    Why those styles are not properly enqueued with wp_enqueue_style?

    In essence, the strategy we are currently using was the most pragmatic and efficient way we were able to find that would adequately support our theme customizer options across the widest possible range of themes.

    It’s something we’ll almost certainly continue to adjust and refine, though, so a switch to an enqueued asset isn’t off the table.

    Does that answer your questions?

    Thread Starter ddur

    (@ddur)

    Hi, thanks for reply.

    No, this is not answer for main problem.
    Please take better look at the code.

    You have typing error, script tag with style content:
    <script type="text/css"

    it should be:
    <style type="text/css"
    like few rows below in source. Please check again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unbelievable: CSS style inlined within SCRIPT tag’ is closed to new replies.