Problems with XHTML 1.0 and FireFox Problems with XHTML 1.0 and FireFox
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Problems with XHTML 1.0 and FireFox

Started by amirw2k, December 01, 2005, 10:35:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

amirw2k

I'm not sure if this is the right forum, but here goes -

I've installed ver 1.42 stand-alone and using FireFox 1.0.7.

I'm not sure why it happens, as I'm not an expert in DTD, but from the beginning the gallery didn't show up properly in FireFox. I tried all the themes and it's like the CSS wasn't loading. I must say that in Internet Explorer everything looked great as it should.

I've done some research and discovered you've moved to XHTML 1.0

This was the problematic line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

I ran the site through the W3 validator and it found 3 errors which I wasn't able to fix, and to be honest, I read that people wasted hours on trying to fix their website to be XHTML 1.0 compliant for FireFox.

My question is, what good does this XHTML 1.0 gives us and why do you use it?

To solve the "problem" I did a mass-replace on all the DTD lines in all files and replaced everything back to:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

After that, everything is working properly (IE + FireFox). I'd love to hear some thoughts regarding this issue.

Amir W.

Joachim Müller

can you post a link to a page that gives you issues, or have you updated all themes?

amirw2k

Unfortunately, I've updated all the files so the problem doesn't exist anymore...
I know it's not the place to ask why FireFox is so aggressive about these validation errors but it's absurd that because of 3 small errors the entire design is ruined, while in IE it works.

Does the XHTML 1.0 DTD adds something to coppermine that I'll be missing using the normal HTML 4.01 DTD?

DJMaze

#3
FYI Apart from replacing all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

A trick would have been to place the following somewhere inside include/init.inc.php
header('Content-type: application/xhtml+xml; charset=utf-8');

Then if you visit your site thru Firefox the document is properly handled as xhtml document.
So if a page has a bug in tags it will show you exactly where that bug is.

The differences between XHTML and HTML are of many but the main goal of W3C regarding this you have to understand what xml is. If you do then the explanation is simple.
When you work with XHTML the design was ment to place tag variables inside CSS and not in the document.
For example you have
<table border="0" cellspacing="2" cellpadding="4" bgcolor="#000000">

This would be split up to
<table>and a CSS file
.table {
border: 0;
padding: 4px;
border-spacing: 2px;
background-color: #000;
}


This way your html document becomes very tidy and fast but it also has issues.
For example you're not allowed to use javascript to write to the document like
document.write('<b>foo</b>');
This is because a xhtml document is rendered only once on retrieval.

There are many more benefits and one of them is that Firefox shows you where a tag error exists so that you write 100% correct webpages which are the fastest already.

As a correct XHTML example look at my index of http://moocms.com/ i can't show you more about xhtml at the moment but i can next year when MOO cms is finished.
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

donnoman

XHTML Compliance is HEAVILY dependent on the theme that you are using.  The core themes have been gone through many times as has the core code to try to guarantee that the core of coppermine is XHTML compliant.

That can be blown away by a sloppy theme writer, or a converter who doesn't know to fix XHTML problems during conversion. (Though we say that in the theme upgrade documentation).

From the information you've given us it's impossible to say what you actually found.  I know the current Coppermine validates, even with my own contributed theme.

I would guess, that your documents do not validate either. Some of the changes that happened in the core to make it XHTML compliant is mutually exclusive of being able to validate on an html 4.0 parser.  Probably won't make much difference to actual browsers, since they can work with some pretty sloppy html.


amirw2k

QuoteA trick would have been to place the following somewhere inside include/init.inc.php
header('Content-type: application/xhtml+xml; charset=utf-8');

Then if you visit your site thru Firefox the document is properly handled as xhtml document.
So if a page has a bug in tags it will show you exactly where that bug is.

DJMaze, I'll try this sometime, thanks for the tip. I'm not going to change back to XHTML for now. I'm a programmer but I've always looked on HTML more like as a design and less as a programming language, and up until now it worked for me very well. I don't have enough time to debug HTML/XHTML documents. Too much work  :-\