Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw Code Appearing on Huntt Theme #7993

Open
cat-og opened this issue Aug 3, 2024 · 8 comments
Open

Raw Code Appearing on Huntt Theme #7993

cat-og opened this issue Aug 3, 2024 · 8 comments
Assignees
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report". [Feature Group] Appearance & Themes Features related to the appearance of sites. Needs triage [Pri] Normal [Type] Bug Something isn't working

Comments

@cat-og
Copy link

cat-og commented Aug 3, 2024

Quick summary

  • The Huntt theme is both Premium and retired

On the default Home page (showing recent posts), raw code appears at the top of the page.
Screenshot on 2024-08-03 at 10-17-40

Steps to reproduce

  1. Switch to Huntt theme
  2. On live site, Posts page (or Home page if set to show most recent posts) scroll down so that the top of the page is no longer visible, then scroll back up.
  3. Raw code will have appeared at the top of the page.

What you expected to happen

I will be able to scroll up and down the posts list without additional effects

What actually happened

After scrolling down the page, when you scroll back up, raw code appears at the top of the page.

Browser

Google Chrome/Chromium, Mozilla Firefox, Microsoft Edge, Apple Safari, iOS Safari

Context

Customer Report

Platform (Simple, Atomic, or both?)

Simple, Atomic

Other notes

Code which appeared on my simple site, Starter plan:

/* <![CDATA[ */ function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function () { oldonload(); func(); } } } /* ]]> */

On my simple site, Explorer plan, the same code appeared three times in a row.

During my tests, I found that the code tended to vary from site to site, but in all variations, the above line of code was the one consistent element, though not always at the top or beginning of the code section.

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

Yes, difficult to implement

Workaround details

If the site is an Atomic site, they should be able to go to Jetpack > Dashboard, then scroll to Theme Enhancements. There the 'Infinite Scroll' can be updated to 'Load more posts using the default theme behavior', which switches the user to a paginated posts display, and the page can't scroll down far enough to trigger the issue.

However, this is not an option on Simple sites, and turning off infinite scroll does not help, as the new posts load in the same page and user will then continue scrolling and trigger this issue.

@cat-og
Copy link
Author

cat-og commented Aug 4, 2024

8562731-zd-a8c

@retnonindya
Copy link

8638510-zd-a8c -- Simple site

Copy link
Contributor

github-actions bot commented Aug 22, 2024

Support References

This comment is automatically generated. Please do not edit it.

  • 8562731-zen
  • 8638510-zen
  • 8742904-zen
  • 8757766-zen
  • 9024155-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report". label Aug 22, 2024
@retnonindya
Copy link

📌 REPRODUCTION RESULTS

  • Tested on Simple – Replicated
  • Tested on Atomic – Uncertain (I can't find the theme on the Themes Showcase on my AT site)

📌 FINDINGS/SCREENSHOTS/VIDEO
I can replicate the issue, and I received similar report from a user.

📌 ACTIONS

  • Triaged

@hacchism
Copy link

Another report with the Huntt theme. 8742904-zd-a8c

@cat-og
Copy link
Author

cat-og commented Sep 24, 2024

Another report here. Huntt theme, simple site. 8757766-zd-a8c

@chad1008
Copy link

Also reported here, Atomic site. 9024155-zd-a8c

@dd32 dd32 self-assigned this Jan 15, 2025
@dd32
Copy link
Member

dd32 commented Jan 15, 2025

This appears to be caused by Infinite scroll loading all of the <title>, <link>, <meta>, and <script> elements in addition to the expected <article>, and <div> entries, the theme's Masonry implementation then does what is effectively jQuery('script').show() which TIL causes the raw javascript to be displayed on the screen.

Noting this here while I get access to PR it.

@@ -176,7 +176,7 @@

             // Reactivate masonry on post load

-            var newEl = $container.children().not('article.post-loaded, span.infinite-loader, div.grid-sizer').addClass('post-loaded');
+            var newEl = $container.children('article, div').not('article.post-loaded, div.grid-sizer').addClass('post-loaded');

             newEl.hide();
             newEl.imagesLoaded(function () {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. aka "Happiness Request", or "User Report". [Feature Group] Appearance & Themes Features related to the appearance of sites. Needs triage [Pri] Normal [Type] Bug Something isn't working
Projects
Development

No branches or pull requests

5 participants