More discussion on the broken CUSTOM CODE block #1135
-
So I am still trying to find a way to get certain dynamic things display on a page.... I have a BRAND NEW fresh install with several pages with only a global header and a global footer. my steps to reproduce error:
as soon the page refreshes on publish I get this: Live site looks like this after I refresh (which is correct): So some one tell my why CUSTOM CODE always give me these problems.... Last time I tried an inline Java it destroyed an entire beta site until I figured out how to get into the database itself to remove it. BEWARE using "Custom Code" in a Global Block... I made the page into a template and exported it: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In this particular case, it's the JavaScript itself.
See this: https://stackoverflow.com/questions/19941866/document-write-overwriting-the-document I've tested the following code in RC 2 Nightly Build in Custom Block and it works great (within global block as well).
|
Beta Was this translation helpful? Give feedback.
In this particular case, it's the JavaScript itself.
document.write("- "+new Date().getFullYear());
is replacing the entire page.See this: https://stackoverflow.com/questions/19941866/document-write-overwriting-the-document
I've tested the following code in RC 2 Nightly Build in Custom Block and it works great (within global block as well).