CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> IDE/GUI

 Codecharge 5 mangling HTML

Print topic Send  topic

Author Message
steveni

Posts: 33
Posted: 01/22/2013, 5:48 AM

Hi All,
I use CCS to insert CMS elements into existing web sites for developers who aren't good with this sort of thing.
I create new pages by naming them the same as an existing html page - CCS uses this as a template and constructs the page. I am using CCS 5 in php4/5 mode.
I quite often have issues where CCS modifies the html when I insert an element. I am working on one project (as much as is possible) where CCS completely screws up the html so the entire code is almost comments. Table and td, tr tags are moved to the end etc. A real mess.
I tried turning this off in options->html formatting but no go. I also tried setting another html editor in options-> general but this makes no difference i.e. still uses CCS editor and screws up the code.
It only seems to happen when switching from html view to design or when inserting a CCS element.
Anyone else with these issues? The same code in Dreamweaver 5.5 passes all code tests with no problems so I think it the way CCS is reading the code (and trying to be helpful).
I am stuck at the moment in that I can't move on with this project and the clock is ticking.
Any advice?
Steve
View profile  Send private message
DataDoIT
Posted: 01/22/2013, 8:40 AM

Most often the culprit of this is an open-ended tag. ie: An open <div>
and no closing </div>. Or <table>, or <blockquote>, etc.

Could also be an unrecognized tag. If you find a tag that is not in the
HTML Formatting list, then that could also cause CCS to burp.

Could also be a mismatch between the page's character set and your
project's character set. Consequently malformed comments or javascript
code that don't match the expected internationalization and/or character
set would cause CCS to burp.

Regardless of the cause, should you find the culprit, do all
CodeChargers a favor and pass this onto support for updating in the next
release. If you take your current HTML that is causing fits and pass
onto support right now, they may be willing to help find the cause.
steveni

Posts: 33
Posted: 01/22/2013, 3:44 PM

Thanks for that. I parsed the code with Dreamweaver 5.5 and it found no problems.
I have forwarded the pre and post code to support.
I reverted to CCS4.3 and restarted the project only to have the same thing happen.
I will keep you informed.
View profile  Send private message
steveni

Posts: 33
Posted: 01/23/2013, 3:57 AM

The problem seems to happen when there is a Flash Object in the code such as this:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="788" height="285" align="middle" id="FlashID" title="Auto Centre">
<param name="movie" value="auto_centre.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="8.0.35.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object data="auto_centre_townsville.swf" type="application/x-shockwave-flash" width="788" height="285" align="middle">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="8.0.35.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

Note that this is exactly how it is generated by Dreamweaver and a check with W3C says it is ok. CCS decides that this needs to be rewritten and all the code following for some reason.

View profile  Send private message
DataDoIT
Posted: 01/23/2013, 7:58 AM

Okay. What you should do is put that flash object code into a label
component, making sure the content of the component is set to HTML.

Check back in if you can't figure out how to do that.
steveni

Posts: 33
Posted: 01/23/2013, 8:14 AM

No problem, done that before.
The pages I am adding to don't belong to me and they tend to think I am playing games when I alter their code so that any changes must be done by me - it is an advantage ;-)

I am running dialogue with support at the moment but not getting far. I can't seem to get a response about CCS rewriting html and mangling it. I can't see why CCS would touch any code that is not within CCS tags. At least this should be an option to turn this off. I suspect they don't think many of us are integrating CCS components into existing web pages i.e. the web site is being built from the ground up with CCS.

It gets fun when the site is CSS/Javascript heavy!

****** I think this topic has been closed as I am unable to post a reply so here is my update:

All good advice.

I usually include my content through include pages. The only way I could get them to work on this last project and even then I had to work on the html page when including and then publishing as this seemed to stop the html regeneration.
I will speak with the site owner about the necessity to modify their code in future. This has always been an issue as they like to modify the html that they produced as required and me using labels or even CMS to dynamically add code snippets that are upsetting CCS will annoy them no end.
I would much prefer that YES provide some ability to quarantine existing code from being rewritten. A comment tag each side could easily act as a directive. If this functionality exists I don't know about it.
View profile  Send private message
DataDoIT
Posted: 01/23/2013, 8:33 AM

Tips you may already know...

1. Your CCS pages should be 'includable'.
2. Try to keep out as much as possible <style>'s and <script>'s.
Reference them externally in your own files instead.
3. Place objects in labels (as discussed). You'll also find many tags
from the new HTML5 that will need to be built in labels dynamically.
The <article> tag is an example.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.