Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Problems with XHTML 1.0 and FireFox  (Read 5851 times)

0 Members and 1 Guest are viewing this topic.

amirw2k

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 37
Problems with XHTML 1.0 and FireFox
« on: December 01, 2005, 10:35:51 am »

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:
Code: [Select]
<!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:
Code: [Select]
<!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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Problems with XHTML 1.0 and FireFox
« Reply #1 on: December 01, 2005, 10:39:35 am »

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

amirw2k

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 37
Re: Problems with XHTML 1.0 and FireFox
« Reply #2 on: December 01, 2005, 10:49:44 am »

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?
Logged

DJMaze

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 831
    • Dragonfly CMS
Re: Problems with XHTML 1.0 and FireFox
« Reply #3 on: December 01, 2005, 02:58:47 pm »

FYI Apart from replacing all
Code: [Select]
<!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
Code: [Select]
<table border="0" cellspacing="2" cellpadding="4" bgcolor="#000000">
This would be split up to
Code: [Select]
<table>and a CSS file
Code: [Select]
.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
Code: [Select]
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.
« Last Edit: December 01, 2005, 03:10:38 pm by DJMaze »
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Problems with XHTML 1.0 and FireFox
« Reply #4 on: December 02, 2005, 07:42:32 am »

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.

Logged

amirw2k

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 37
Re: Problems with XHTML 1.0 and FireFox
« Reply #5 on: December 10, 2005, 03:34:50 am »

Quote
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.

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  :-\
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.