mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9.15k stars 22.47k forks source link

Issue with "Bounce off the walls": (Not loading the code example/iframe at bottom) #7571

Closed SquidQid closed 3 years ago

SquidQid commented 3 years ago

iframerror MDN URL: https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript/Bounce_off_the_walls

What information was incorrect, unhelpful, or incomplete?

Not loading the code example/iframe at bottom of page due to security error it seems. Thanks! Forgive me if this has been addressed already. I could not find an open issue but I am new.

Specific section or headline? See attached pic.

What did you expect to see?

Did you test this? If so, how? Yes. Multiple browsers.

MDN Content page report details * Folder: `en-us/games/tutorials/2d_breakout_game_pure_javascript/bounce_off_the_walls` * MDN URL: https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript/Bounce_off_the_walls * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/games/tutorials/2d_breakout_game_pure_javascript/bounce_off_the_walls/index.html * Last commit: https://github.com/mdn/content/commit/c7d9128559ed9526914c9be5bb461445fde5866a * Document last modified: 2021-02-19T20:09:33.000Z
NegiAkash890 commented 3 years ago

Thanks! Working on this .

NegiAkash890 commented 3 years ago

Currently :

image

Now ( After Editing ) :

image

Hi @sideshowbarker , I used the inspector and the problem is probably because of the iframe .Doubles quotes are missing at the end of the url of iframe . I am not able to find how should I fix this issue or do we have any specific repo from where these iframe are being used.

This is the line that needs to be fixed and it uses JSFiddleEmbed and I have no idea how should or where this resource is ?

https://github.com/mdn/content/blob/6ff2f916e4caac210219bd314e5f4e38ce8cc2bd/files/en-us/games/tutorials/2d_breakout_game_pure_javascript/bounce_off_the_walls/index.html#L98

sideshowbarker commented 3 years ago

This is the line that needs to be fixed and it uses JSFiddleEmbed and I have no idea how should or where this resource is ?

https://github.com/mdn/content/blob/6ff2f916e4caac210219bd314e5f4e38ce8cc2bd/files/en-us/games/tutorials/2d_breakout_game_pure_javascript/bounce_off_the_walls/index.html#L98

See https://github.com/mdn/yari/pull/4428 — the sources for all the macros used in MDN articles live in files in https://github.com/mdn/yari/tree/main/kumascript/macros with the same file basename as the macro name. So the source for the JSFiddleEmbed macro is at https://github.com/mdn/yari/blob/main/kumascript/macros/JSFiddleEmbed.ejs.

And for local testing, the place where copies of the macros get put in your local environment is in the node_modules/@mdn/yari/kumascript/macros/ subdirectory. So if you change your local copy of the JSFiddleEmbed.ejs there, your local Yari will pick up that change.