WeekendHK news website, can’t close photo gallery after clicking on photo

When you click on the photos on this site, it opens a photo gallery where you can click left/right to move between photos, but the x to close the gallery to return to the article doesn’t work. Nothing happens when you tap the x.

Turns out my pihole DNS ad blocker was the culprit. I determined this because the site works fine when pihole is disabled or I bypass my network (LTE).

After many hours of troubleshooting, and with the help of my dev friend doing some Chrome dev tracing, it turns out the close button program is hidden in the ad that loads above the photo gallery. So if the ad is blocked then so is the function to close the gallery.

To fix this I had to whitelist the following domains on my DNS server:
www.googletagservices.com
securepubads.g.doubleclick.net

This does enable some ads but at least the site works again.

Update: the whitelist no longer works, had to update the whitelist to *.googletagservices.com instead of just www.googletagservices.com, even though logs on the DNS server was showing it was blocking www.googletagservices.com.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.