Getting NaN/-Infinity in Products Page After Import

Topic summary

Issue: “NaN/-Infinity” text appears on product pages with multiple images, desktop only. User had minor theme edits earlier (e.g., button color), but the problem surfaced after a product import (likely unrelated).

Cause identified: The product media layout is set to “stack,” which doesn’t use a slider. Slider buttons are being rendered anyway—likely due to prior theme code changes—leading to erroneous text/output.

Proposed fixes:

  • Preferred: Switch product image gallery to “carousel with thumbnails,” which removes the issue.
  • Alternative: If keeping “stack,” hide the stray slider controls via CSS: #shopify-section-template--21990297403696__main .slider-buttons { display: none !important; }.

Guidance: One advisor cautioned against masking the issue and recommended fixing the slider logic rather than just hiding controls; asked about backups and exact code changes. Collaborator access was granted to investigate.

Evidence: A screenshot was shared to illustrate the “stack vs. carousel” setting central to the fix.

Status: User acknowledged the help and appears satisfied. Resolution is to change to carousel or apply CSS; deeper code cleanup may follow via collaborator access.

Summarized with AI on January 8. AI used: gpt-5.

Hi,

What are you seeing is the slider buttons, something is wrong with the code that is why they are displayed like this.

You can hide this at all by following these steps:

  1. Go to online stores

  2. Edit Code

  3. Open your base.css file

  4. Paste the following Code at the bottom of your file

#shopify-section-template–21990297403696__main .slider-buttons {display: none !important;}

  1. Save

Let me know if it worked by accepting this as a solution. If not let me know if you like to give me collaborator access to check the issue for you.