Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1023916
    Karen
    Participant

    Hey X-perts! Since the last update my jQuery to hide emails has just stopped working. Fine in Icon, Ethos and Integrity stacks as far as I can tell.

    This is the code:
    jQuery(document).ready(function($) {
    var $appendmail = $(‘.appendmail’);
    if ( $appendmail.length ) {
    var username = “enquiries”;
    var hostname = “kcgraphics.co.uk”;
    var linktext = username + “@” + hostname;
    $(“” + linktext + ” “).appendTo( $appendmail );
    }
    });

    This is where is works in Ikon: http://www.kcgraphics.co.uk/contact/

    and here Ethos (sorry crap server my client has this on makes this very slow): http://office28.co.uk/location/

    Integrity Stack working: http://reflectivetransfersdirect.com/contact/

    This is an example of Renew stack where it doesn’t: http://seic.kcgdemo.co.uk/contact_seic/

    Thanks!

    #1024191
    Lely
    Moderator

    Hello There,

    Thank you for the complete information above.
    It is not working because there’s a javascript error. Please remove the script tag. It is not needed in the customizer. See attached screenshot for guidance.

    #1025669
    Karen
    Participant

    Hello Lely – that’s brilliant thank you so much! – must have been a total coincidence that this Renew site also stopped working.. maybe another error somewhere but cannot get it to work here either.. http://www.xthemeusers.com/contact-us/ difficulty with this one is several people have added code! 🙁

    #1026263
    Rue Nel
    Moderator

    Hello There,

    Are you using CloudFlare or may have installed a caching plugin like WordFence, W3 Total Cache or WP Super Cache? Please keep in mind that after doing every updates and even making any slight changes, always remember to clear all caches when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

    Hope this helps. Please let us know how it goes.

    #1026496
    Karen
    Participant

    Hello Rue Nel, yes using Cloudflare but also running many other X sites, with the same script and they all work, not using Wordfence, W3 Total Cache or WP Super Cache.

    I have cleared caches. No luck 🙁

    #1027058
    Rad
    Moderator

    Hi there,

    Even if they are all running the same CloudFlare, there is a chance that they serve different caches and minified files.

    I just checked this http://seic.kcgdemo.co.uk/contact_seic/ and it’s now working.

    Except this one http://www.xthemeusers.com/contact-us/, the only difference that I can see is CloudFlare’s Rocket Loader. Your other site doesn’t have that loader. That loads javascript asynchronously without respect to the correct order of dependencies (eg. libraries). Would you mind disabling it while testing?

    You can verify it by viewing site’s source code and you’ll find similar to this

    <script id="x-customizer-js" type="text/rocketscript" data-rocketoptimized="true">
          jQuery(document).ready(function($) {
    var $appendmail = $('.appendmail');
    if ( $appendmail.length ) {
    var username = "admin";
    var hostname = "xthemeusers.com";
    var linktext = username + "@" + hostname;
    $("<a href='mailto:" + linktext + "'>" + linktext + " </a>").appendTo( $appendmail );
    }
    });
        </script>

    With this : type="text/rocketscript" data-rocketoptimized="true"

    Thanks!

    #1027491
    Karen
    Participant

    Thanks, the other stacks which are running the script successfully are also on Cloudflare with Rocket Loader on… I have turned off but seems to make no difference to this site. I will do some further investigations over the next couple of days, obviously there is some conflict. Thanks for your help.

    #1027709
    Karen
    Participant

    Update: Discovered the plugin causing the error..User Profiles Made Easy http://codecanyon.net/item/user-profiles-made-easy-wordpress-plugin/4109874?ref=ThemeFluent
    Once this was disabled the hidden email script and another plugin worked!! 🙂

    So this has been resolved. Thanks for your time and effort.

    #1027713
    Lely
    Moderator

    You’re welcome!

    Do let us know how this goes.

  • <script> jQuery(function($){ $("#no-reply-1023916 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>