Live code editor bug reports

Posted 1 year, 1 month ago (Edited 2 months, 17 days ago) by circlejourney

A brand new bug report thread - report your bugs here! After several months of missing forum posts because I wasn't getting notifications, I figured I'd create this. Check below to see if your bug is described and try the fixes (if applicable). If that doesn't resolve the issue, then feel free to post a bug report below and I can give you personalised help! This can also help me with identifying and fixing bugs.


Bug report form

  • Operating system and browser:
  • Description of the bug:
  • Link to code that made the bug appear (if available):
  • Screen captures (if available):

Common bugs and how to fix them

Stuck on loading screen

Description: You're stuck on the loading screen with the spinny wheel. The load screen doesn't disappear. This can happen for several reasons:

  • Your browser, adblocker or VPN is blocking JavaScript on the page, preventing the site from functioning.
  • The browser is storing a cached (outdated) version of the code (possibly because I forgot to do proper cache busting, my bad), and mismatches in code files are causing errors.
  • Your custom code is causing Ace Editor to crash (e.g. having HTML tags inside an HTML comment confuses Ace Editor's code parser).

Fix: To isolate the cause, the first thing to do is open the browser's console (usually F12) and see if the error messages give you any insights. Then, check if the site loads fine in incognito/private browsing. If it is also broken in incognito, it is probably an issue with your browser, firewall or VPN blocking some of the script files: see if turning that off makes it load. If it's OK in incognito, and you have an adblocker extension, turn that off and see if that fixes it.

If you're sure the above things are not the cause, go to the code editor and hit Ctrl+Shift+R or Cmd+Shift+R. This will force the browser to download any new code files to replace cached versions.

If the problem still persists and you're sure the code is causing the problem, click the hard reset link on the loading screen, which should download your code into files and clear the code panels. Occasionally, it can be that my website is broken in some way, in which case simply drop a comment below.


Code has disappeared after reopening the editor

Description: You open the code editor, and all your code that you were working before has disappeared. Sometimes, a couple of lines still remain. This happens occasionally, and I still haven't figured out the cause of it. As of adding the "backup restore" feature, there is now a way to retrieve a backup from the last time you edited it.

Fix: First thing is, do NOT refresh the page as this could replace your backup. Delete everything from the text field that bugged out. The trash icon will turn into a trash-undo icon . If all went well, the previous version of the code when you last closed the editor should now show up inside the relevant text field.


CSS that works on Toyhouse is broken on code editor

Description: After pasting CSS from Toyhouse into the code editor's CSS area, there are no visible changes in the preview, or it doesn't show up as expected. This is almost always because the CSS code is trying to import a stylesheet from a private Toyhouse URL that this code editor can't see. Check for a line that looks like @import 'some/characters/here'.

Fix: Toyhouse import rules are intentionally designed to prevent theft of CSS sheets. One workaround is to fetch the CSS from the relevant profile's page source code, but please do not do this without permission from the creator of the CSS.


HTML that works on Toyhouse is broken on code editor

Description: The theme looks fine on Toyhouse but on the code editor it "explodes" and things are in the wrong places. This usually happens because of missing closing tags (e.g. a li doesn't have a matching /li). Toyhouse applies some back-end processing to your code after you post it and automatically fixes missing end tags, but my code editor doesn't have that functionality.

Fix: Look for missing closing tags. Some of Ace editor's tools can be useful for that—clicking the little down arrow next to a start tag will cause the entire element to collapse, if you have properly closed it. If Ace can't find a matching closing tag, the element will fail to collapse.


HTML that works on code editor is broken on Toyhouse

Description: The code looks and interacts just fine on the editor, but on Toyhouse, certain elements look broken (usually split up in weird ways), or interactive elements don't function as expected when clicked. This happens because Toyhouse applies some back-end changes and cleanup to your code after you post it, before it is displayed. It is picky about certain formatting, e.g. it doesn't like div tags inside a tags, and only supports clickable/interactive a and button tags.

Fix: Check if you have any div tags inside a tags or are trying to use a div tag as an interactive element (these 2 situations are the most common). Generally, check if you have any block elements (like div) inside inline elements (like a or span).


Cursor is visually displaced from actual typing input

Description: Your cursor is one place, but when you type, the text appears somewhere else. Sometimes mouse interactions are also displaced. This is a visual glitch caused by Ace Editor's rendering, usually occurring when the editor is resized.

Fix: Refreshing the page will usually fix this.


Import widget says that import is not allowed (even after adding "allow-thcj-import" line)

Description: Even after adding the "allow-thcj-import" line, attempting to import the code from Toyhouse leads to the same error message stating that import is not authorised. Usually this is because the character is on auth only.

Fix: You can authorise my bot account fuchsiamoonrise to let the code editor "see" your auth only characters.


No select/cut/copy/paste functionality on mobile device

Description: Mobile context menu doesn't give you the option to copy, cut or paste text. In some cases, it will not even let you highlight text. Normally, cut/paste is handled by your device. However, many mobile devices don't play nice with Ace Editor because of their custom text input solution.

Fix: There is no known fix besides using a different device, my apologies. I will have to look into Ace docs to see if there is a workaround for this.

mintymichi
  • Operating system and browser: Windows 10 + Chrome
  • Description of the bug: Copying 3 or more lines of code past line 100 freezes the site. When I try to refresh the site, I get a popup telling me the page is unresponsive. If I exit the site via popup, it gives me error code: RESULT_CODE_HUNG.
    I tried deleting my cache and cookies multiple times and then loading in my saved code to a clean HTML box but the same thing happens.
    Occasionally, it will even freeze if I copy 3+ lines (sometimes less) before line 100, but it only happens if I have 2 tabs of the site open: 1 tab with the 1st frozen site, and the 2nd tab with the site freshly opened and then trying to copy something. Other times, it has a chance happening when trying to use the site with the loaded code after deleting cache/cookies.
    Thank you so much for this useful site and I hope you can help me with this very specific bug :,)) !!
  • Link to code that made the bug appear : rainandhail's f2u code // my slightly modified version of code I was loading into the site 

circlejourney

Thanks for the report! The code editor is unfortunately still more memory intensive than I would like, but I don't seem to be getting the same error as you with the code you shared. Does this only happen with this code, or do you also get the bug with other long codes e.g. pick a random HTML code and copy it multiple times until it's 400 lines long

mintymichi

Yeah, unfortunately it happens with other long codes as well. Though I tried it on my friend's laptop and everything seemed to work perfectly, so it might be a problem unique to my pc :,) but thank you so much for checking out the problem regardless! 

benjik
circlejourney

Hi, this sounds like a bug with the Toyhouse site itself - you're probably looking for this forum! https://toyhou.se/~forums/14.suggestions-bugs

glxtter-pxlls

Operating system and browser: Windows 11 and Opera Description of the bug: I can't type into any text boxes in Opera, including the login text boxes, character profiles, literatures, and even here (I had to use Chrome to write this). I am currently on the most recent version of both Windows and Opera and have already tried clearing my cache and cookies for the browser and uninstalling + reinstalling it.

circlejourney

This sounds like a bug report for the Toyhouse site (this thread is for the live code editor), the forum to post that in is here: https://toyhou.se/~forums/14.suggestions-bugs

glxtter-pxlls

Whoops! Sorry about that! Thank you!

sigilbean

Operating system and browser: Windows 10 + Chrome

Description of the bug: Tabs on the left side won't change on the live editor, but it does on Toyhou.se. My issue is I had been using this same code template before and it worked; I suppose an update might have done something? I had stopped coding for a few months and picking it back up today, I noticed

Link to code that made the bug appear (if available): https://toyhou.se/17939951.-f2u-cq-digital-template

Additional screenshot: This popped up when hovering over the buttonsimage.png?ex=6566b4a6&is=65543fa6&hm=d82


circlejourney

The code you linked is working for me on Windows 11 Chrome. Have you edited your version of the code in any way? (Feel free to DM me the current version if it's different from the one at the link.)

sigilbean

I haven't; a direct copy/paste from the link results in the same thing. I checked on the mobile version though and that seems to work

starflayers
nothing is changed between the code put on toyhouse and whats in the editor, and im not exactly sure how to fix this, or if ive done something unfixable LOL


most notable issues are tabs arent working & text thats supposed to be a header is presenting as the regular text size

R-A-Z-I-E-L
  • Operating system and browser: Windows 11 + Chrome (Latest Update)
  • Description of the bug: Lagging, extreme delay on editing. TEST ON EDITOR. 
  • Link to code that made the bug appear (if available): Crash Test 11.26
  • Screen captures (if available): image.png?ex=6575e4d6&is=65636fd6&hm=e46
  • This code was originally a normal code, but it somehow glitched and became incredibly decoded. Whenever the code pops up, this creates a lag and (more often than not) makes the editor unresponsive. In order to fix this, you would have to close the tab or refresh, but this means you have to wait longer or go to a new editor entirely. A note that this is NOT meant to be edited in any way, and simply a test to see how far the editor can take. I am assuming either the characters itself caused the editor to crash, but since the characters go from red to yellow, there is an encryption I am not seeing. 
  • It is very important to note that using this test code WILL 100% MAKE YOUR EDITOR LAG. Depending on how fast your internet is, it could take a while. But the point of this test was to see how much it could take before it kicks the bucket. And, from what I could gather, it handles up to 40 lines, at best. 
  • This is NOT an encouragement to make people try this themselves. DO NOT download the file just to paste it into the editor. This is not a bug. This is a TEST. Nothing more. 
  • Take note how the HTML hasn't changed AT ALL. The only time it EVER shows up is when you click the "convert to HTML". The code itself otherwise will not change onto the toyhouse code no matter where you put it, what option you choose, etc. It will simply remain on the code side and refuse to convert itself. 
circlejourney

Thanks for doing this! It looks like you were importing file data in bytes that the editor can't parse as HTML and it just got confused. Curious about how you did so, did you select a file through the import button?

R-A-Z-I-E-L

I did, indeed! Would you like to have the original file for that? 

circlejourney

Interesting, I know how to create the bug myself so I don't need the file, but I'm planning on checking the uploaded file type in a future update so that you can only upload plain text files.

R-A-Z-I-E-L

Gotcha, okay~! Thanks for the heads up on that regard, then, I will do some importing and grab some codes to shift into text files for the sake of testing as well! If you would like me to run a few tests in advance or anything like that, please feel free to let me know! I'm more than happy to do so! 

VanillaArtCat

Operating system and browser: Windows 11 & Chrome
Description of the bug: The code works on Toyhouse but it doesn't work in the code editor. Specifically, the tabs won't work. It will show the first tab no matter which tab I click on, though it works fine on Toyhouse. I tried reloading the browser, deleting the code then reloading the browser, the "please reset!" command, & resetting my computer, but those didn't fix it. I also tried the fix for the common bug "HTML that works on Toyhouse is broken on code editor", but the description didn't exactly fit my problem & I couldn't find any missing closing tags (Though it is very possible I missed them). I opened up the code editor in the browser Opera then put in the exact same code & it works perfectly fine there. I would just start using it on Opera but I use Chrome much more & I'd like to stop this from happening again/being able to fix it if it occurs again, so it'd be nice if I could fix it & I would appreciate any help.
I do have another bug that occurred right before this one where the preview of my code shows up on the left side of the screen where the list of menu options should be. If you know a fix for that issue too or could help me find one, that'd be appreciated, but I'm much more concerned about the first bug since it prevents me from previewing my code whereas this one is just a little visually annoying.
Link to code that made the bug appear (if available): N/A
Screen captures (if available): (First pic is main tab on Chrome, second is another tab, third is main tab on Opera, fourth is another tab)Screenshot_37.png?ex=65940274&is=65818d7Screenshot_38.png?ex=65940274&is=65818d7Screenshot_39.png?ex=65940274&is=65818d7Screenshot_41.png?ex=65940274&is=65818d7

circlejourney

Just real quick it looks like the code on the left is inside the blurb section, it seems to happen occasionally when switching layouts. Click the "blurb" header next to "HTML" and you will probably see the custom code there (you can delete it)

As for the second bug, would you be willing to DM the code to me? That sounds like it could be caused by a few different things and if it's a bug in my editor, I'd be happy to fix it!

VanillaArtCat

Oh, thank you, I was able to get rid of the code on the side! For the other bug, yes, I don't mind dm-ing you the code. Just give me a moment. Thank you!

VanillaArtCat

Ah, wait! That's weird, it seems to be fine now. I already sent you the code but I suppose you don't have to look at it anymore so you can ignore that dm since I can't delete it. Maybe it got fixed when I deleted the blurb?

circlejourney

oh, that makes sense. given that, I suspect it's because the blurb had duplicate elements with the same ID - so clicking the tabs was probably changing the sidebar instead of the main area 😂

VanillaArtCat

Yeah, that was probably what it was. Thank you for your help! Also thank you for making such a great code editor :D

1 Replies
druuls
  • Operating system and browser:
Windows 10 on Chrome


  • Description of the bug:
Anytime I try to add an image url into the image bracket the whole website freezes and has to be closed


  • Link to code that made the bug appear (if available):
N/A


  • Screen captures (if available):
    p.png(trying to put the image in between the empty quotes)
circlejourney

The image embed doesn't seem to be working, is this a problem with a specific HTML code that you're using?

druuls

Sorry the image didn't show! Also I fixed the issue anyways! There was just something wrong with the specific image link I was using and was able to change the images link and add it in :]

circlejourney

Redd_LuckyClover I can see you deleted the comment, but I just wanna check if that bug is still happening?

Redd_LuckyClover

uuuuunfortunately so. even happens sometimes with th's client code editor which is weird

WheatDew
Myrrinian
  • Operating system and browser: Ipad Pro iPadOS 16.6.1 (20G81) and Safari 
  • Description of the bug: the editor shows a copy of the code within the nav bar — like a blurp — that doesn’t go away even after I cleared all UI-windows. Reloading doesn’t do the trick either, it’s like frozen in place :’)
  • Link to code that made the bug appear (if available): it‘s a p2u bundle but here is where I use the code: Folder , I edited it a bit to fit my css.
  • Screen captures (if available): IMG_3825.png?ex=65f231e3&is=65dfbce3&hm=IMG_3826.png?ex=65f231e3&is=65dfbce3&hm=
circlejourney

Oh, it might have gone into the blurb tab (if you click "Blurb" you might see the code there). I'm still not sure why it does that sometimes, but it probably happens when switching layouts / themes. did you do either of those right before this happened?

Myrrinian

I checked the blurb tap and found it empty but I tried switching layout and clearing the tap again, just to check, and then it finally disappeared?? Very odd. No I didn’t do either or but I guess as it’s gone now I’m better not touching it again xD

Thank you!

circlejourney

yeah that's super weird, that probably means the code ended up saved in the blurb storage - I still don't know why it happens and can't seem to reproduce this error so I can debug it, but if you run into it again let me know what you did just before it happened - thanks for the report!

Glossymillz
  • Operating system and browser: Ipad IOS 16.6
  • Description of the bug: Duplicated live editor? Even though there is no code, I have refreshed, closed tab, restarted my device, disappears when I toggle side bar.
  • Link to code that made the bug appear (if available): https://toyhou.se/19619060.-free-simple-html
  • Screen captures (if available):IMG_0156.png?ex=65f96ed3&is=65e6f9d3&hm=IMG_0155.png?ex=65f96ed3&is=65e6f9d3&hm=
circlejourney

Hi, sorry for the delay! It looks like code keeps jumping to the blurb tab for some people, and I'm not sure why that's happening. Could you check if you see any code in the "Blurb" tab in the code area?

If not, and if you haven't typed anything new into the code area yet, you can still get a copy of the old backup by opening the console (F12 on most browsers) and pasting this in:

restoreBackup("html")

And then hit enter. Let me know if any of this helps, and sorry about the inconvenience!