Announcement

Collapse
No announcement yet.

Can't add code to Headinclude, 404 Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [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/

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

    Code:
     <!-- (C)2000-2013 Gemius SA - gemiusAudience / technopat.net / Homepage -->
      <script type="text/javascript">
      <!--//--><![CDATA[//><!--
      var pp_gemius_identifier = new String(\'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\');
      //--><!]]>
      </script>
      <script type="text/javascript" src="http://www.technopat.net/xgemius.js"></script>
    (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 4th Jan '14, 9:43am.
    http://www.technopat.net/forum/

    Comment


    • #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 customization and demonstration site.
      vBulletin 5 Documentation - Updated every Friday. Report issues here.
      vBulletin 5 API - Full / Mobile
      I am not currently available for vB Messenger Chats.

      Comment


      • #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 4th Jan '14, 10:20am.
        http://www.technopat.net/forum/

        Comment


        • #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...
          X