Making WordPress.org

Opened 5 weeks ago

#7791 new defect (bug)

Plugin page carousel sometimes has a JS error, causing screenshots to display massive

Reported by: medavidallsop's profile medavidallsop Owned by:
Milestone: Priority: normal
Component: General Keywords:
Cc:

Description

Hi,

I have noticed that occasionally when viewing any plugin page, the JS seems to break which puts the screenshots into a carousel, resulting in the screenshots being displayed huge across the page.

Here is an example of what the page looks like when it occurs:

https://i.postimg.cc/zBQkMd3F/Screenshot-2024-10-03-at-1-36-26-PM.png

When this happens it remains like it for most of the day even after a hard refresh, and the next day it is back to normal.

I'm not sure what exactly causes it - but it appears to happen more when I move from one wifi connection to another, maybe just coincidence.

Here is the JS error in console:

Uncaught TypeError: (0 , t.render) is not a function
    at theme.js?ver=43ab82ac4ef93561f4cc:1:11044
    at theme.js?ver=43ab82ac4ef93561f4cc:1:11087
    at theme.js?ver=43ab82ac4ef93561f4cc:1:11091
    at theme.js?ver=43ab82ac4ef93561f4cc:1:11095

Those line numbers are:

!function(s) {
            const i = document.getElementById("screenshots");
            if (!i)
                return;
            const n = i.querySelectorAll("figure")
              , r = [];
            for (let e = 0; e < n.length; e++) {
                const t = n[e].querySelector("figcaption")
                  , s = {
                    src: n[e].querySelector("img.screenshot").src,
                    caption: t ? t.textContent : ""
                };
                r.push(s)
            }
            r.length > 0 && (0,
            t.render)((0,
            e.createElement)(l, {
                screenshots: r
            }), i)
        }()

Change History (0)

Note: See TracTickets for help on using tickets.