Support » Plugin: 3CX Live Chat and Talk » Fragment caching using 3CX Live Chat and Talk plugin

  • We would like to use the 3CX Live Chat and Talk plugin using the mfunc setting using the W3TC caching plugin.

    For some reason we get error 50 when using the following code in our template (Changed the id in this example):
    <!– mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> –>
    echo do_shortcode(‘[3cx-clicktotalk id=”0000″ title=”Chat and call with Support”]’);
    <!– /mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> –>

    While the following code is working fine:
    <!– mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> –>
    echo date(“H:i:s”);
    <!– /mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> –>

    To make sure it is not an issue with shortcodes we tested the following code, which is working fine as well (changed the ID):
    <!– mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> –>
    echo do_shortcode(‘[contact-form-7 id=”00″ title=”Contact form”]’);
    <!– /mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> –>

    So the issue looks like to be an compatibility issue between fragment caching and the 3CX Live Chat and Talk plugin.

    Do you have solution for this?

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

Viewing 1 replies (of 1 total)
  • We did some further testings.

    When using the following code in the template it works:
    <?php echo do_shortcode('[3cx-clicktotalk id="8309" title="Chat of Bel met Support"]'); ?>

    After I test a form using the mfunc function, this works:

    <!-- mfunc tbdynamicfragment -->
    echo do_shortcode('[contact-form-7 id="12" title="Contact formulier"]');
    <!-- /mfunc tbdynamicfragment -->

    But the following doesn’t work:

    <!-- mfunc tbdynamicfragment -->
    echo do_shortcode('[3cx-clicktotalk id="8106" title="Chat of Bel met Support"]');
    <!-- /mfunc tbdynamicfragment -->

    This covered a couple of things:
    – mfunc does work, also with shortcodes.
    – 3cx is working outside the mfunc function

    When using the mfunc function it does something I can see it when I check the sourcecode of the page. In the following div:
    <div class="entry-content">

    It loads:

    <style>#callus-8106{--call-us-form-header-background:#de3c29; --call-us-header-text-color:#ffffff; --call-us-form-width:250px; ; --call-us-form-height:470px;
    }</style>
    
    <call-us id="callus-8106" style="position: fixed; bottom:8px; z-index:9999;right:8px;" phonesystem-url="https://sub.domain.nl:0000" party="support" invite-message="Hallo, waar kan ik je mee helpen?" allow-call="true" operator-name="Support" popout="true" animation-style="slideup" enable-poweredby="false" facebook-integration-url="https://www.facebook.com/technoberg" twitter-integration-url="" email-integration-url="support@technoberg.nl" allow-soundnotifications="true" ignore-queueownership="true" enable-onmobile="true" show-operator-actual-name="false" show-typing-indicator="true" auto-focus="true" minimized-style="bubble" allow-video="false" minimized="false" window-title="Chat of bel met Technoberg support" authentication-message="" unavailable-message="" window-icon="https://www.technoberg.nl/wp-content/uploads/2019/11/TB_round_Logo.png" operator-icon="https://www.technoberg.nl/wp-content/uploads/2019/11/TB_round_Logo-50x50.png" authentication="name"></call-us></div>

    But the part #shadow-root (open) isn’t loaded. It seems that the Shadow DOM cannot be loaded. This shows the webcomponent isn’t working.

    Could this be fixed?

    • This reply was modified 2 months, 1 week ago by technoberg.
    • This reply was modified 2 months, 1 week ago by technoberg.
    • This reply was modified 2 months, 1 week ago by technoberg.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.