Project

General

Profile

Actions

Bug #11506

closed

Home Page Slideshow - blank slide

Added by scott voth almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Homepage Slides
Target version:
Start date:
2019-05-31
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Hero slideshow seems to have a blank slide at the beginning:

<img alt='css.php' src="https://commons.gc.cuny.edu/wp-content/plugins/cookies-for-comments/css.php?k=56432b1df3e67e3f4dcdbad943087b&o=i&t=224126708" width='1' height='1' /> <div class="slide first_slide">


Related issues

Related to CUNY Academic Commons - Bug #11453: 403 error on FirefoxResolvedRaymond Hoh2019-05-14

Actions
Actions #1

Updated by Boone Gorges almost 5 years ago

  • Status changed from New to Assigned
  • Assignee changed from scott voth to Raymond Hoh
  • Target version set to 1.15.3

Thanks, Scott. This stems from Ray's fix in https://redmine.gc.cuny.edu/issues/11453#note-7. The Cookies for Comments image was being triggered for the very first WP_Query loop on the page, which in the case of the homepage appears to be the hero slider. I made a quick change in https://github.com/cuny-academic-commons/cac/commit/e02df374165ecbef0c0d04b60b5bd9e7d6a78322 that limits the loop_start and loop_no_results callbacks so that they only add the image if we're in the main query. I believe this will avoid problems like this more generally, but it definitely needs review from Ray :)

Actions #2

Updated by Boone Gorges almost 5 years ago

  • Related to Bug #11453: 403 error on Firefox added
Actions #3

Updated by Raymond Hoh almost 5 years ago

Good catch, Boone.

The main query limitation was something I considered, but thought it would be better to open up the restriction so the Cookies for Comments asset had a better chance of being rendered before the footer.

Currently, if you check the Cookies for Comments asset on the historyprogram.commons.gc.cuny.edu site (the site referenced in #11453), the asset is now loaded in the footer instead of before.

Maybe, instead, I can check the post type and bail if the post type matches 'slide'?

Actions #4

Updated by Boone Gorges almost 5 years ago

I'd considered the 'slide' blacklist, but it seems like this leaves us open to whack-a-mole for other similar problems.

That being said, this is a very specific problem to the homepage slider plugin, which parses body content for img tags. This is very unusual, and is unlikely to arise in many other cases. So maybe the blacklist is OK.

Happy to go with whatever you think best.

Actions #5

Updated by Boone Gorges almost 5 years ago

  • Target version changed from 1.15.3 to 1.15.4
Actions #6

Updated by Boone Gorges almost 5 years ago

  • Target version changed from 1.15.4 to 1.15.5
Actions #7

Updated by Raymond Hoh almost 5 years ago

  • Status changed from Assigned to Resolved

Let's mark this as resolved for now.

Actions

Also available in: Atom PDF