[wp-meta] [Making WordPress.org] #7791: Plugin page carousel sometimes has a JS error, causing screenshots to display massive
Making WordPress.org
noreply at wordpress.org
Thu Oct 3 12:39:56 UTC 2024
#7791: Plugin page carousel sometimes has a JS error, causing screenshots to
display massive
---------------------------+--------------------
Reporter: medavidallsop | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: General | Keywords:
---------------------------+--------------------
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:
[[Image(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)
}()
}}}
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/7791>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list