disappearing code

Please LogIn to Reply!

Post By: admin | 26-01-2012 06:35 Reply

 

why is it that if i paste / write code in (for example) the Content pane while creating a CMS page.

then I “save and contiue edit” the code will run as expected on the front end ----- but ---- sometimes some it will disappear on the backend.

it does not seem to matter if I am using wisiwig editor or the pop out “html” pane.

i frist noticed it when I was was tring out some html5 and thought it made sense the html5 tages might have issses.

but now i see it happening in the following code…

i paste this:

<div>

<!--    
1Reference to the files containing the JavaScript and the styles.    These files must be located on your server. -->

<
script src="http://pro-tools-training.com/new-magento2/skin/frontend/default (kagi)/kagi-modern/highslide/highslide-with-html.js" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="http://pro-tools-training.com/new-magento2/skin/frontend/default (kagi)/kagi-modern//highslide/highslide.css" />

<!--    
2Optionally override the settings defined at the top    of the highslide.js file.-->

<
script type="text/javascript">// <![CDATA[
hs.graphicsDir 'http://pro-tools-training.com/new-magento2/skin/frontend/default (kagi)/kagi-modern/highslide/graphics/';
hs.outlineType 'rounded-white';
hs.wrapperClassName 'draggable-header';
// ]]></script>

<div>

<!--    
3Mark up the main content like this to use a self rendering content wrapper with inline    main contentThe content is grabbed from the first subsequent    div with a class name of .highslide-maincontent. --> 

<
a onclick="return hs.htmlExpand(this)" href="index.htm"Open HTML-content </a>

<
div class="highslide-maincontent">

<
h3>Lorem ipsum</h3>
Lorem ipsum dolor sit ametconsectetuer adipiscing elitAliquam dapibus leo quis nislIn lectusVivamus consectetuer pede in nislMauris cursus pretium maurisSuspendisse condimentum mi ac tellusPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestasDonec sed enimUt vel ipsumCras consequat velit et justoDonec mollismi at tincidunt vehiculanisl mi luctus risusquis scelerisque arcu nibh ac nisiSed risusCurabitur urnaAliquam vitae nislQuisque imperdiet semper justoPellentesque nonummy pretium tellus.</div>

</
div>

save

it works on front end

i go to back end

i see this:

<div><!--    1Reference to the files containing the JavaScript and the styles.    These files must be located on your server. -->
<
script src="http://pro-tools-training.com/new-magento2/skin/frontend/default (kagi)/kagi-modern/highslide/highslide-with-html.js" type="text/javascript"></script>
<!--    2Optionally override the settings defined at the top    of the highslide.js file.-->
<
script type="text/javascript">// <![CDATA[
hs.graphicsDir 'http://pro-tools-training.com/new-magento2/skin/frontend/default (kagi)/kagi-modern/highslide/graphics/';
hs.outlineType 'rounded-white';
hs.wrapperClassName 'draggable-header';
// ]]></script>
<div><!--    3Mark up the main content like this to use a self rendering content wrapper with inline    main contentThe content is grabbed from the first subsequent    div with a class name of .highslide-maincontent. --> <a onclick="return hs.htmlExpand(this)" href="index.htm"Open HTML-content </a>
<
div class="highslide-maincontent">
<
h3>Lorem ipsum</h3>
Lorem ipsum dolor sit ametconsectetuer adipiscing elitAliquam dapibus leo quis nislIn lectusVivamus consectetuer pede in nislMauris cursus pretium maurisSuspendisse condimentum mi ac tellusPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestasDonec sed enimUt vel ipsumCras consequat velit et justoDonec mollismi at tincidunt vehiculanisl mi luctus risusquis scelerisque arcu nibh ac nisiSed risusCurabitur urnaAliquam vitae nislQuisque imperdiet semper justoPellentesque nonummy pretium tellus.</div>
</
div>
</
div>

in other words;;;this

<link rel="stylesheet" type="text/css" href="http://pro-tools-training.com/new-magento2/skin/frontend/default (kagi)/kagi-modern//highslide/highslide.css” />

disappeared

this is only one expame . it happens alot

makes for quite a nightmare when trying to troubleshoot code!!!!!!!!!!!!!

 

Wisiwig editor removes “incorrect html elements” on loading. You can see it on editing:

1. Go to CMS pages and start edit
2. Hide editor
3. enter

<div zzz>test</div>
4. Show editor. You will see
test
5. Hide editor and you will see
<div>test</div>

 Signature 

My Magento ver. 1.4.1.1
My Magento ver. 1.6.1.0
My Magento ver. 1.6.2.0

ET WebSolutions community extensions

 

that’s what i thought and thanks

i am not always the bestest coder so i do make mistakes

but actually i wish i could turn that “feature” off

like with the html5...its just an annoyance.

the html5 works but i have to fight magneto backend display of code.

 

I think fastest solution is disabling wisiwig editor.

 Signature 

My Magento ver. 1.4.1.1
My Magento ver. 1.6.1.0
My Magento ver. 1.6.2.0

ET WebSolutions community extensions

`Reply Or Comment!
Please LogIn to Reply!