This topic has 8 replies, 2 voices, and was last updated 8 years by Radu.

  • Author
  • #112523
     fersamp
    Participant

    Hi,
    I have a SyntaxError: illegal character when loading home page.

    In particular:

    COPY CODE
    <p><script>// <![CDATA[
    (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/it_IT/sdk.js#xfbml=1&version=v2.5"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));
    // ]]></script></p>

    Is it a problem about facebook sdk for login?

    How can I solve it?

    Thank you

    #112590
     Radu
    Moderator

    Hi,

    Do you have latest theme version 4.0.4 ?

    Also this kind of issue can be caused by some third plugins, do you have a plugin for social connect ? if yes try to disable it to see if that causes this

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #112725
     fersamp
    Participant

    Hi Radu,

    I have the latest KLEO version and these plugin active:
    <p style=”text-align: left;”>BuddyPress</p>
    <p style=”text-align: left;”>BuddyPress Cover Photo</p>
    <p style=”text-align: left;”>Seleziona BuddyPress Multilingual</p>
    <p style=”text-align: left;”>Contact Form 7</p>
    <p style=”text-align: left;”>Events Manager</p>
    <p style=”text-align: left;”>Events Manager and WPML Compatibility</p>
    <p style=”text-align: left;”>K Elements</p>
    <p style=”text-align: left;”>rtMedia for WordPress, BuddyPress and bbPress</p>
    <p style=”text-align: left;”>rtMedia Upload Terms</p>
    <p style=”text-align: left;”>Slider Revolution</p>
    <p style=”text-align: left;”>Seleziona UpdraftPlus – Backup/Restore</p>
    <p style=”text-align: left;”>WPBakery Visual Composer</p>
    <p style=”text-align: left;”>WPML Multilingual CMS</p>
    <p style=”text-align: left;”>WPML String Translation</p>
    <p style=”text-align: left;”></p>
    <p style=”text-align: left;”>I have still the same problem.</p>
    <p style=”text-align: left;”>Uncaught SyntaxError: Unexpected token ILLEGAL</p>

    #112727
     fersamp
    Participant

    Sorry for the post, I don’t know why it gave me a syntax error even the post 🙂

    I have the latest KLEO version and these plugin active:

    • BuddyPress
    • BuddyPress Cover Photo
    • Seleziona BuddyPress Multilingual
    • Contact Form 7
    • Events Manager
    • Events Manager and WPML Compatibility
    • K Elements
    • rtMedia for WordPress, BuddyPress and bbPress
    • rtMedia Upload Terms
    • Slider Revolution
    • Seleziona UpdraftPlus – Backup/Restore
    • WPBakery Visual Composer
    • WPML Multilingual CMS
    • WPML String Translation

    But I have still the same problem – Uncaught SyntaxError: Unexpected token ILLEGAL

    #112764
     Radu
    Moderator

    Hi,

    Try to disable all plugin except : Visual Composer, K-elements, Buddypress and Revolution Slider

    Let me know if the error goes away

    If the error not goes away please provide me URL and credentials to check

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #112772
     fersamp
    Participant

    Hi Radu,

    I localized the problem: Facebook Page code that I inserted in a row element.

    I used this code got direclty from Facebook Developer page:

    <script>// <![CDATA[ (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = “//connect.facebook.net/it_IT/sdk.js#xfbml=1&version=v2.5”; fjs.parentNode.insertBefore(js, fjs); }(document, ‘script’, ‘facebook-jssdk’)); // ]]></script>

     

    But I need it… Probably it is in conflit with Kleo login facebook…

    How can I use both together?

    #113071
     Radu
    Moderator

    Hi,

    Try to put that is in header not in body from wp-admin -> theme options -> general settings -> quick js.

    Let me know

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #113224
     fersamp
    Participant

    I didn’t add it manually, so I could add that jv code in quick js but I don’t know where to remove the old.

    #113267
     Radu
    Moderator

    Maybe some plugin inject the js code into body, try to disable all plugins except visual composer, revolution slider , woocommerce and K-elements then clear cache and and see if the js is there if is still there please provide an url to take a look

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?