• Resolved webharvest

    (@webharvest)


    I am using conditional logic in my Caldera Form. I’ve noticed lately that characters are being added around fields that use conditional logic. I figured out that this happened after I installed W3TC. When the field using logic are displayed the following is displayed. The “Field using Conditional Logic” test below is the meant to represent the actual field.
    /* “Field using Conditional Logic” /]]>/

    I noticed that if I don’t set a default value in the field that controls the conditional logic so the field using the conditional logic is displayed when the page first loads; the characters are not displayed. If I set the value so the field using the conditional logic is hidden and then set it so it is displayed the characters appear.

    The only thing I can figure out is the conditional logic uses HTML script tags and W3TC must not be able to handle HTML script tags.
    So I believe it has a bug since HTML script tags are standard.
    Can someone help me solve this? It looks very poor

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @webharvest,

    The plugin uses <script type="text/html" and we add CDATA comments around it for security reasons. The upcoming release fixes that CDATA issue for specific script types.
    Add this code which will also make sure the next release will work with the caldera form plugin

    add_filter( 'w3tc_minify_html_script_minifier', 'ignore_type_text_html', 10, 2 );
    function ignore_type_text_html($minifier, $type) {
        if ( $type === 'text/html' ) {
            $minifier = '';
        }
        return $minifier;
    }
    Thread Starter webharvest

    (@webharvest)

    Thank you but I tried adding this code to my child theme functions.php file but I still see the same behavior. I purged the cache for that page as well but it still shows the same behavior.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @webharvest,

    As said previousy: “The upcoming release fixes that CDATA issue for specific script types.”

    This code that you have added will make sure the next release will work with the caldera form plugin

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘BUG: When using Caldera Form cond logic & W3TC a /* and /*]]>*/ added’ is closed to new replies.