Header:

--> --> -->

Is there a reason the same data is loaded over and over again? This may not be a bug but I find it very strange.

Thanks

Comments

mstef’s picture

Sorry...

<script type='text/javascript'><!--// <![CDATA[
  var OA_zones = {
    'Leaderboard' : 33716,
    'Skyscrapper' : 33726,
    'Adrect-Main' : 33717,
    'Adrect-Page-1' : 33717,
    'Adrect-Page-2' : 33717,
    'Adrect-Page-3' : 33717  }
// ]]> --></script>
<script type='text/javascript' src='http://d1.openx.org/spcjs.php'></script>

<script type='text/javascript'><!--// <![CDATA[
  var OA_zones = {
    'Leaderboard' : 33716,
    'Skyscrapper' : 33726,
    'Adrect-Main' : 33717,
    'Adrect-Page-1' : 33717,
    'Adrect-Page-2' : 33717,
    'Adrect-Page-3' : 33717  }
// ]]> --></script>
<script type='text/javascript' src='http://d1.openx.org/spcjs.php'></script>
<link rel="shortcut icon" href="/sites/all/themes/addari/favicon.png" type="image/x-icon" />
<script type='text/javascript'><!--// <![CDATA[
  var OA_zones = {
    'Leaderboard' : 33716,
    'Skyscrapper' : 33726,
    'Adrect-Main' : 33717,
    'Adrect-Page-1' : 33717,
    'Adrect-Page-2' : 33717,
    'Adrect-Page-3' : 33717  }
// ]]> --></script>
<script type='text/javascript' src='http://d1.openx.org/spcjs.php'></script>
<script type='text/javascript'><!--// <![CDATA[
  var OA_zones = {
    'Leaderboard' : 33716,
    'Skyscrapper' : 33726,
    'Adrect-Main' : 33717,
    'Adrect-Page-1' : 33717,
    'Adrect-Page-2' : 33717,
    'Adrect-Page-3' : 33717  }
// ]]> --></script>
<script type='text/javascript' src='http://d1.openx.org/spcjs.php'></script>
<script type='text/javascript'><!--// <![CDATA[
  var OA_zones = {
    'Leaderboard' : 33716,
    'Skyscrapper' : 33726,
    'Adrect-Main' : 33717,
    'Adrect-Page-1' : 33717,
    'Adrect-Page-2' : 33717,
    'Adrect-Page-3' : 33717  }
// ]]> --></script>
<script type='text/javascript' src='http://d1.openx.org/spcjs.php'></script>

idontknowtheanswer’s picture

It's a bug. The header is output for each openx block on the page. The fix is fairly straightforward, I'll upload the patch if I can work out how to!

brmassa’s picture

Guys,

i need to investigate why its doing this, since i added a test:

function _openx_javascript() {
  static $spc_code;

  // No need to add the header more than once
  if (!empty($spc_code)) {
    return;
  }
  ...

I will try fix this as soon as possible.

regards,

massa

brmassa’s picture

Guys,

i finally got what is going on: i believe some newer D6 release messed with block cache. Im pretty sure its a Drupal core bug. Go to performance and disable the block cache. Thats it.

regards,

massa

brmassa’s picture

Status: Active » Fixed
idontknowtheanswer’s picture

Sorry for re-opening this brmassa. Why do you think this is a bug in Drupal? If you disable the block cache then openx_invoke is called for every block, this in turn will call _openx_javascript every time. Since _openx_javascript doesn't check whether it's already been called for the page it outputs the SPC code each time it's called.

The test that you've posted is basically what we've done to fix the issue.

brmassa’s picture

I Dont Know the Answer (hehe),

Dont worry to reopen the issues if there is still questions.

Man oh man... i just find out that ive never released a new feature containing this fix... its in my computer for ages!

regards,

massa

mstef’s picture

I implemented manually with block cache on - no problems at all.

idontknowtheanswer’s picture

Hi mike,

It "fixes" the problem because with block caching on the block is only rendered once - hence you don't get the duplicate JS. I'm not sure if it's applicable to you but my understanding of Drupal is that as a logged on user block caching is bypassed so you'll see the duplicate JS issue again. May not be a problem if you don't have authenticated users on the site.

mstef’s picture

That doesn't seem to make any sense. If that were the case, every block would be showing repetition. Sounds like it must be a coding issue, though I didn't bother to look inside the module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Michsk’s picture

This issue is from 09, but the bug is still there. Is this module dead?! I can not use the blockcache, since i have some modules that do not permit it.

Michsk’s picture

Status: Closed (fixed) » Active
gordon’s picture

Status: Active » Fixed

This has been fixed with the updates I just did

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.