Calgarypuck Forums - The Unofficial Calgary Flames Fan Community
Old 01-31-2019, 09:30 PM   #61
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

So just to confirm 2a is still fine and 2 still has the problem.

I'll have to figure out what else is different, I thought they were the same otherwise.

EDIT: Or wait, you mean the ads are back being a problem in 2a?
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 01-31-2019, 10:20 PM   #62
FlamesFanInEdmonton
Backup Goalie
 
Join Date: Apr 2015
Exp:
Default

That's correct. I'm currently using 2a on my iPhone with no issues. When I revert to 2 the ads come back.

Quote:
Originally Posted by photon View Post
So just to confirm 2a is still fine and 2 still has the problem.

I'll have to figure out what else is different, I thought they were the same otherwise.

EDIT: Or wait, you mean the ads are back being a problem in 2a?
FlamesFanInEdmonton is offline   Reply With Quote
The Following User Says Thank You to FlamesFanInEdmonton For This Useful Post:
Old 02-01-2019, 09:56 AM   #63
Gaskal
Franchise Player
 
Gaskal's Avatar
 
Join Date: Nov 2013
Exp:
Default

Started seeing issues about 2-3 days back on Samsung Galaxy S9. Basically site is unusable now on mobile.

Both Chrome and Samsung Internet apps behave same way as Diemenz's screenshot.
__________________
Until the Flames make the Western Finals again, this signature shall remain frozen.
Gaskal is offline   Reply With Quote
The Following User Says Thank You to Gaskal For This Useful Post:
Old 02-01-2019, 09:58 AM   #64
gilligans_off
Powerplay Quarterback
 
gilligans_off's Avatar
 
Join Date: Sep 2007
Exp:
Default

Same problems here on an Apple
gilligans_off is offline   Reply With Quote
Old 02-01-2019, 10:14 AM   #65
Diemenz
First Line Centre
 
Diemenz's Avatar
 
Join Date: Sep 2009
Location: Calgary, Alberta
Exp:
Default

Yeah it has been bad on mobile safari for about 4-5 days now. I don’t even bother browsing the site just go to email notifications on posts because navigation is a nightmare. Even closing the ad leaves the banner there and prevents any navigation on the top half of the forum.

A content blocker will do away with it but then you lose Twitter links and a few others. I don’t like using them because that advertising is what keeps sites open but I don’t know if another option at this time.
__________________
PSN: Diemenz
Diemenz is offline   Reply With Quote
Old 02-01-2019, 02:18 PM   #66
psyang
Powerplay Quarterback
 
Join Date: Jan 2010
Exp:
Default

Not sure if this helps in the debugging, but the problem seems to stem from an incorrectly computed margin-left value for the ad's div tag.

Here's the ad in the wrong location. Note that the margin-left is set to -797px.
Spoiler!


If I turn off the margin-left, the ad pops back to the correct location:

Spoiler!
psyang is offline   Reply With Quote
The Following 4 Users Say Thank You to psyang For This Useful Post:
Old 02-01-2019, 05:43 PM   #67
flame^thrower
Scoring Winger
 
flame^thrower's Avatar
 
Join Date: Aug 2003
Location: canuckleheadville
Exp:
Default

I'm getting this as well now. Chrome and the Internet browser for Samsung. Took forever just to get into this thread!
flame^thrower is online now   Reply With Quote
Old 02-01-2019, 05:57 PM   #68
flame^thrower
Scoring Winger
 
flame^thrower's Avatar
 
Join Date: Aug 2003
Location: canuckleheadville
Exp:
Thumbs up

I blocked javascript in site settings and that seems to have worked

Edit: now that I can read the site, I see the suggestion to switch to 2a

Last edited by flame^thrower; 02-01-2019 at 06:00 PM.
flame^thrower is online now   Reply With Quote
Old 02-01-2019, 08:43 PM   #69
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

Quote:
Originally Posted by psyang View Post
Not sure if this helps in the debugging, but the problem seems to stem from an incorrectly computed margin-left value for the ad's div tag.
All that is generated from Google, I just insert Google's Javascript into the page and when the page loads Google's script replaces it with the ad code.

It's weird that the two templates generate different results, still comparing to try and figure out what's different.
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 02-01-2019, 11:24 PM   #70
browna
Franchise Player
 
browna's Avatar
 
Join Date: Mar 2002
Location: Calgary
Exp:
Default

Issue for me. Android, Chrome. Only way to click in is be super quick before ad loads, ad rest of page is unrepsonsive to clicks once ads load.
If it pops onto a reply screen, SOL to type anything.

Quarantine the problem to only appear the game threads and will save many of us mental anguish.
browna is offline   Reply With Quote
Old 02-02-2019, 10:56 AM   #71
Kasi
Powerplay Quarterback
 
Join Date: Jan 2010
Location: Burnaby
Exp:
Default

Yeah I’m still good. Been on 2A for several days with no issues.
Kasi is offline   Reply With Quote
Old 02-02-2019, 12:11 PM   #72
psyang
Powerplay Quarterback
 
Join Date: Jan 2010
Exp:
Default

Just doing a bit of debugging this morning. It looks like style 2a works because it is an older file that references the googleapis using http instead of https. This fails, and actually prevents the ads from loading.

Spoiler!

In style 2, the non-secure link to google's apis is commented out and replaced with some script which dynamically loads google's scripts via https.

Spoiler!


I suspect if the google scripts were loaded in the same way, style 2a would show the same issue.

As for the actual issue, it's tough slogging through compressed javascript, even with Chrome's pretty-printer. One lead is that I can see a certain property (_breakglass_mode_) is being set to 2. If it is instead set to 1, the left-margin is created properly (as a relative value, instead of an absolute value). Alternatively, if the owning object for that property is not created at all, no left-margin is computed and the ad is in the correct place. So far as I can see, when the ad is in the correct location, it's because the owning object is not created in the first place.

I'm taking a break, but will try to look again later today.
psyang is offline   Reply With Quote
Old 02-02-2019, 02:48 PM   #73
psyang
Powerplay Quarterback
 
Join Date: Jan 2010
Exp:
Default

Ok, had some time to do more debugging this afternoon.

The script to generate the ads makes a call to the ad server to get the ad details. Unfortunately, this call sometimes returns "good" ads (ads that are positioned properly) and "bad" ads (ads that block the forum).

Using Fiddler, I can execute the exact same request to the ad server, and I will get both "good" and "bad" ads. In the below examples, there are two ads returned. The first is for the top banner, the second is for the side.

This is a bad ad:
Spoiler!

Notice the side banner ad has the _breakglass_mode_ = 2, which is what triggers the incorrect margin-left value. Also notice, it is tagged to "use_safe_frame", which is probably related.

A good ad doesn't set the _breakglass_mode_ value or tag the ad to use a safe frame. Instead, it sets "inabox_meta":
Spoiler!


Since the call is exactly the same, there's nothing CP can do (such as change the call's parameters) to ensure it gets good ads. It is entirely up to the ad server.

Because the margin-left style that gets set is inline, and tagged as important, there's no way to provide css to override it.

So, the only alternative is to add some javascript to the page that runs after the ads load, and changes the style directly. The tricky part is ensuring the javascript runs after the ads are displayed. The below script will poll every second to see if the ad is up. If so, it will reset the left-margin, then stop polling.

I'll leave it to CP if they want to use the script or not. Use at your own risk.
Also, if there is a new change to the ads, this script may not work. I think the script is harmless - at worst, it will poll every second and do nothing. However, it might be possible that this script violates the google ads TOS as they might not like post-manipulation of a served ad.

This is a formatted version with comments.
Code:
<script type="text/javascript">
var pollTime = 1000; // 1000ms, or 1 second.
var timerId = setInterval( 
  // this function will run every second.
  function(){

    // the id of the div tag that contains the ad. This doesn't seem to change.
    var adId = "div-gpt-ad-1461011238474-1";

    // get the ad's div tag.
    var element = document.getElementById(adId);

    // if we were successful, the ad is up. Remove the margin-left style.
    if ( element ) {
      element.style["margin-left"]="0"; // set margin-left to 0
      clearInterval(timerId);  // stop polling.
    } // if
  }, pollTime );
</script>
This is a one line compressed version.
Code:
<script type="text/javascript">var _itv=setInterval(function(){var e=document.getElementById("div-gpt-ad-1461011238474-1");if(e){e.style["margin-left"]="0";clearInterval(_itv);}},1000);</script>
psyang is offline   Reply With Quote
The Following 2 Users Say Thank You to psyang For This Useful Post:
Old 02-02-2019, 03:39 PM   #74
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

Wow thanks for confirming that, I'm a n00b in CSS and javascript so thanks for saving tons of time.

And thanks for confirming it's Google's ads and not something weird in our HTML/CSS/Javascript

Yeah I'd guess the script is probably a violation of the ToS though fixing their ads probably wouldn't get us in too much trouble.

Instead I might just comment out the ad until we can get it fixed.

Thanks for that!!
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 02-02-2019, 04:55 PM   #75
psyang
Powerplay Quarterback
 
Join Date: Jan 2010
Exp:
Default

Quote:
Originally Posted by photon View Post
Wow thanks for confirming that, I'm a n00b in CSS and javascript so thanks for saving tons of time.

And thanks for confirming it's Google's ads and not something weird in our HTML/CSS/Javascript

Yeah I'd guess the script is probably a violation of the ToS though fixing their ads probably wouldn't get us in too much trouble.

Instead I might just comment out the ad until we can get it fixed.

Thanks for that!!
No problem - happy to try to help a site I've enjoyed (for free!) for so long.

Hopefully this is a genuine bug that Google can fix on their end. It'd be a shame for the site to lose ad revenue because of it.
psyang is offline   Reply With Quote
Old 02-02-2019, 09:14 PM   #76
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

I updated Bingo letting him know what you found.
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 02-03-2019, 07:07 AM   #77
Vansmack
Powerplay Quarterback
 
Join Date: Jul 2005
Exp:
Default

Quote:
Originally Posted by Gaskal View Post
Started seeing issues about 2-3 days back on Samsung Galaxy S9. Basically site is unusable now on mobile.

Both Chrome and Samsung Internet apps behave same way as Diemenz's screenshot.
Once I switched to desktop site, the issue went away with S9 W/ chrome
Vansmack is offline   Reply With Quote
Old 02-03-2019, 02:38 PM   #78
the-rasta-masta
First Line Centre
 
the-rasta-masta's Avatar
 
Join Date: Oct 2002
Location: Calgary
Exp:
Default

This is happening to me too. I don’t know what everybody means by switching to 2a... can somebody run me through what that means?
the-rasta-masta is offline   Reply With Quote
The Following 2 Users Say Thank You to the-rasta-masta For This Useful Post:
Old 02-03-2019, 05:59 PM   #79
Playfair
Scoring Winger
 
Playfair's Avatar
 
Join Date: Aug 2005
Exp:
Default

Quote:
Originally Posted by the-rasta-masta View Post
This is happening to me too. I don’t know what everybody means by switching to 2a... can somebody run me through what that means?
On the very bottom on the left you can change the style
Playfair is offline   Reply With Quote
Old 02-04-2019, 09:19 AM   #80
Bingo
Owner
 
Bingo's Avatar
 
Join Date: Dec 2001
Location: Calgary
Exp:
Default

Over my head but I started the process with Google

I may need to ask for specifics from those that know what's going on

Sorry for the delay guys.
Bingo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 10:44 PM.

Calgary Flames
2023-24




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Calgarypuck 2021