Can't add code to Headinclude, 404 Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Recep Baltaş
    Senior Member
    • Sep 2010
    • 267
    • 4.2.X

    [Forum] Can't add code to Headinclude, 404 Error

    Hi,

    I am trying to add this code to my headinclude but I am getting 404 erorr.

    Code:
    <script type="text/javascript">
    <!--//--><![CDATA[//><!--
    var pp_gemius_identifier = 'bQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
    // lines below shouldn't be edited
    function gemius_pending(i) { window[i] = window[i] || function() {var x = window[i+'_pdata'] = window[i+'_pdata'] || []; x[x.length]=arguments;};};
    gemius_pending('gemius_hit'); gemius_pending('gemius_event'); gemius_pending('pp_gemius_hit'); gemius_pending('pp_gemius_event');
    (function(d,t) {try {var gt=d.createElement(t),s=d.getElementsByTagName(t)[0],l='http'+((location.protocol=='https:')?'s':''); gt.setAttribute('async','async');
    gt.setAttribute('defer','defer'); gt.src=l+'://tr.hit.gemius.pl/xgemius.js'; s.parentNode.insertBefore(gt,s);} catch (e) {}})(document,'script');
    //--><!]]>
    </script>
    The problematic line is: gt.setAttribute('defer','defer'); gt.src=l+'://tr.hit.gemius.pl/xgemius.js'; s.parentNode.insertBefore(gt,s);} catch (e) {}})(document,'script');

    Without this line, everything is ok. But when we add it, we get 404.

    Thanks.
    http://www.technopat.net/forum/
  • Recep Baltaş
    Senior Member
    • Sep 2010
    • 267
    • 4.2.X

    #2
    This is the old code and we can add it easily:

    Code:
     [COLOR=#222222][FONT=arial]<!-- (C)2000-2013 Gemius SA - gemiusAudience / [URL="http://technopat.net/"]technopat.net[/URL] / Homepage -->[/FONT][/COLOR]
      [COLOR=#222222][FONT=arial]<script type="text/javascript">[/FONT][/COLOR]
      [COLOR=#222222][FONT=arial]<!--//--><![CDATA[//><!--[/FONT][/COLOR]
      [COLOR=#222222][FONT=arial]var pp_gemius_identifier = new String(\'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\');[/FONT][/COLOR]
      [COLOR=#222222][FONT=arial]//--><!]]>[/FONT][/COLOR]
      [COLOR=#222222][FONT=arial]</script>[/FONT][/COLOR]
      [COLOR=#222222][FONT=arial]<script type="text/javascript" src="[URL]http://www.technopat.net/xgemius.js[/URL]"></script>[/FONT][/COLOR]
    (Removed Unique identifier)

    FYI:

    Mode sec was completely disabled by our hosting provider and the problem still exists.
    Disabled hooks, still problem
    Disabled GZIP still problem.

    vBulletin 4.2.2
    PHP 5.4.23
    Litespeed
    Last edited by Recep Baltaş; Sat 4 Jan '14, 9:43am.
    http://www.technopat.net/forum/

    Comment

    • Wayne Luke
      vBulletin Technical Support Lead
      • Aug 2000
      • 73981

      #3
      You'll have to bring this up with the person who wrote the original code. It isn't building the URL correctly it seems.
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment

      • Recep Baltaş
        Senior Member
        • Sep 2010
        • 267
        • 4.2.X

        #4
        Zachery has solved the problem.

        Solution:


        Try adding:


        <vb:literal>

        </vb:literal> around your code.

        Thanks. BTW, I really aprreciate your help on the weekend.
        Last edited by Recep Baltaş; Sat 4 Jan '14, 10:20am.
        http://www.technopat.net/forum/

        Comment

        • Zachery
          Former vBulletin Support
          • Jul 2002
          • 59097

          #5
          The issue is with the javascript and our praser, adding <vb:literal> tags around it tells the parser to just treat it as plaintext instead of template code. The 404 error was likely an internal server error, or another PHP error being suppressed.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...