Correcting Broken Code and Errors

Greetings @vishsahu ,

I have been a bit quiet because I have been trying to understand what I am doing, and I did some research on why custom code may fail on Drapcode even though it runs perfectly on platforms like CodePen.
I now realise I may have made several mistakes on a number of my pages. I have been pasting custom code that included inline CSS, JavaScript, and Bootstrap classes directly into the page blocks using the Custom HTML component. After doing this, some of my datatables/ datagroups, links, buttons, and components have stopped working properly — even on pages where I did not add any custom code and were previously working.
Since I do not have a coding background, I am not fully sure where I went wrong or how to check for these issues. Before I ask for detailed help, could you please guide me on the best way to go through my pages and look for:

  • code that is in the wrong place or causing conflicts
  • things that should be moved to the correct location in Drapcode
  • extra Bootstrap or CSS that may be clashing with Drapcode
  • anything inside page blocks that Drapcode does not support
    I also noticed that when I paste code, Drapcode sometimes adjusts it. Some lines disappear, some CSS is moved to the Custom CSS panel, and some JS also shifts around, and this begins to create conflicts. I want to learn how to place code correctly, especially when the custom CSS/JS is important for the UI and UX that I want. I also cannot switch off Drapcode’s own CSS/JS because many of my pages depend on it.
    Before asking you to check my pages, I would like to, as much as possible, clean things up on my own. Could you please tell me the steps I should follow on the Drapcode platform, where to go, what to check, and how to identify and correct these problems?

Thank you very much for your guidance.

Kind regards

Willie

Hi @WillieMak,

I would suggest you put all the CSS code in custom CSS section and all the JS code in custom JS section. This will it will avoid any conflict.

All the classes will be in html code will take the CSS from these CSS files.

Thanks.

1 Like

Thanks @vishsahu
Thanks for the response. So is it ok to assume that when datagroups, data tables or subpages fail to show up in the UI its most likely a JS and or CSS related problem?

@WillieMak Not everytime. Sometime it could be data issue. If you want to check the exact cause, then its better to create a test page and try using that data group/data table on that page and if it loads perfectly there, then you know the answer.

THanks.