• Resolved macpraveen

    (@macpraveen)


    Hi
    SyntaxHighlighter Evolved not working with Simple Facebook Connect. When both plugins are enabled, the following javascript error occurs.

    Node not found DOM Exception 8

    @
    document.getElementsByTagName("head")[0].insertBefore( corecss, document.getElementById("syntaxhighlighteranchor") );

    Even though the ‘head’ element and ‘syntaxhighlighteranchor’ objects are not null, the error is displayed.

    For solution, change the above line in ‘syntaxhighlighter.php’ to,
    document.getElementById("syntaxhighlighteranchor").parentNode.insertBefore( corecss, document.getElementById("syntaxhighlighteranchor") );

    Similarly for this line,
    document.getElementsByTagName("head")[0].insertBefore( themecss, document.getElementById("syntaxhighlighteranchor") );

    change it to,

    document.getElementById("syntaxhighlighteranchor").parentNode.insertBefore( themecss, document.getElementById("syntaxhighlighteranchor") );

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    How is SFC causing this conflict to arise?

    Thread Starter macpraveen

    (@macpraveen)

    I just found out that once the SFC is activated, many of the meta and link tags which are placed inside <head>(before SFC is activated), are all located inside <body> tag including <meta id=”syntaxhighlighteranchor”> (reqd for syntaxhighlighter plugin).

    Hence node not found error, bcos it is searching for “syntaxhighlighteranchor” id inside head but it is found inside body.

    I used Google chrome inspect element and found out this behaviour in this page – https://theopentutorials.com/2011/06/12/online-tests/java/arrays/java-arrays-1/

    I still haven’t tested whether this is theme specific or not.

    I modified sfc-base.php to make it work, exactly at line 15, changing the last parameter to true, that loads the facebook script within the footer.

    Which could be the drawbacks?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Version 1.0 of SFC uses a different approach to load the Facebook code asynchronously, so it shouldn’t have this issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: SyntaxHighlighter Evolved] [Plugin: Simple Facebook Connect] Conflict’ is closed to new replies.