close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

image upload and W3C errors

Thread began 12/02/2009 4:33 am by info97301 | Last modified 12/08/2009 12:33 pm by Eric Mittman | 3796 views | 12 replies |

info97301

image upload and W3C errors

Hi

I've created a site and use the HTML editor to update dynamic pages. If the page only contains text, it passes the W3C validation.

However, if I try to insert an image, the image is displayed properly, but validation fails (even though there is Alt text specified).

The error is always a variation on:
--------------
Line 85, Column 105: end tag for "img" omitted, but OMITTAG NO was specified

…c="/up/picture.jpg"></p>

Line 85, Column 5: start tag was here
<p><img height="400" alt="picture.jpg" width="600" src="/up/pictu...

-------------
Whether it is related or not, when I test the site locally, images are not displayed - even though they exist in the /up/ folder

Any help much appreciated.

Chris

Sign in to reply to this post

neilo

Hi Chris,

Can you post the whole of that line that begins:

<img height="400" alt="picture.jpg" width="600" src="/up/pictu...



That might help.

Sign in to reply to this post

info97301

theline in the editor is:

<p><img height="400" alt="picture.jpg" width="600" src="/up/picture.jpg"></p>

Thanks

Chris

Sign in to reply to this post

neilo

The closing image tag isn't quite complete, - the forward slash before the '>' of the closing image tag is missing. I expect that is what stops the page fully validating.

The line should really be this:

<p><img height="400" alt="picture.jpg" width="600" src="/up/picture.jpg" /></p>
Sign in to reply to this post

info97301

I have tried adding a '/' but it is stripped out when I update the page.

Cheers
Chris

Sign in to reply to this post

Eric Mittman

So if you have this slash at the end it does not get stored in the db like this? Are you manually adding in this image tag in the source or are you adding the image with the insert image button? Also what do you have specified in the doctype declaration for the html standard?

Sign in to reply to this post

info97301

Hi Eric

Adding the slash is not stored in the database. I am using the 'insert image' button in the editor, then 'browse server'.
I have tried different doctypes, with the same results.

I am now getting even weirder resultas - I've obviously done something to totally screw things up, but can'#t fathom what! After I've successfully uploaded images - which are displayed on the page - when I go to the UPDATE page, the images have disappeared, and the source code shows:

<p><img height="&quot;200&quot;" alt="&quot;bedroom&quot;" width="&quot;300&quot;" src="&quot;/up/IMG_3521_300x200.jpg&quot;"></p>

AAAAAAAARghhhhhh!

Cheers

Chris

Sign in to reply to this post

info97301

Sorry, forgot to say I replaced

<meta http-equiv="content-type" content="text/html;charset=utf-8" />

with
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />

following a validation error.

Cheers
Chris

Sign in to reply to this post

Eric Mittman

When I was asking about the doctype I was curious about the html standard you are using, if it is xhtml 1.0 then the validations will catch any missing slash like this.

On your update page it seems that you have some formatting applied to the editor. In the configuration for the editor you should ensure that you do not have any formatting present for the initial value. If you cannot spot this post back with the update page and I can point out where this change will need to be made.

Also, when you are inserting this for the first time are you able to confirm in the source code view that the image has the trailing slash?

If you post back with the insert page I can look to see if there is some formatting on this page that would cause this to happen.

Sign in to reply to this post

info97301

Hi Eric

Sorry for my delay in replying - been trying to do other things with the site!

Lines on all page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
-----------

Getting really weird results now! Text inserts and updates fine. If I insert a picture, the insert is OK, but if I try to update it, the picture is removed and the code has been altered.
The same thing happens if I try to out a Google Map on the page. It goes in OK and is stored in the database, but when I try to update the page I get '&quot;' replacing lots of the code in the editor field.

The code for the field is:

<td colspan="2"><?php
// WebAssist iRite: Rich Text Editor for Dreamweaver
$WARichTextEditor_1 = CreateRichTextEditor ("PgDetails", "HTMLEditor/", "100%", "500px", "Custom", "../custom/pages_Update_PgDetails1.js", "".(str_replace('"', '&quot;', $row_WADApages['PgDetails'])) ."");
?></td>

The /pages_update_OgDetails1.js file is:

// Custom configuration for iRite
FCKConfig.XMLFullName = 'NoUpload';
FCKConfig.XMLFileName = 'NoUpload.xml';
FCKConfig.SkinPath = 'skins/silver/'; // relative to fckeditor/editor/fckeditor.html
FCKConfig.DocType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';

FCKConfig.AutoDetectLanguage = true;
FCKConfig.DefaultLanguage = 'default';

FCKConfig.StartupFocus = false;
FCKConfig.FullPage = false;

FCKConfig.BaseHref = '';
FCKConfig.DefaultLinkTarget = '_self';

FCKConfig.ToolbarSets["Custom"] = [ ['Source'], ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], '/', ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], ['OrderedList','UnorderedList','-','Outdent','Indent'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], ['Link','Unlink','Anchor'], ['Table','Rule','SpecialChar'], '/', ['Style','FontFormat','FontName','FontSize'], ['TextColor','BGColor'], ['FitWindow']]; /* Toolbar end */

FCKConfig.ForceStrongEm = false;
FCKConfig.FormatIndentator = ' ';
FCKConfig.EnterMode = 'p';
FCKConfig.FillEmptyBlocks = false;
FCKConfig.FormatOutput = false;
FCKConfig.FormatSource = false;
FCKConfig.IncludeGreekEntities = false;
FCKConfig.IncludeLatinEntities = false;
FCKConfig.ProcessHTMLEntities = false;
FCKConfig.ProcessNumericEntities = false;
FCKConfig.AdditionalNumericEntities = '';
FCKConfig.ForcePasteAsPlainText = false;
FCKConfig.CleanWordKeepsStructure = false;


FCKConfig.EditorAreaCSS = '../../css/my_styles.css'; // relative to fckeditor/editor/fckeditor.html
FCKConfig.BodyClass = 'featuredLeft';
FCKConfig.StylesXmlPath = ''; // relative to fckeditor/editor/fckeditor.html
FCKConfig.ManagerEnabled = false;
if (false) {FCKConfig.Plugins.Add('kfm');}

Your help is much appreciated.

Chris

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...