View Full Version : Rats Nest of Tables
richkoi
01-25-2006, 10:03 PM
I am helping a client solve this OSCommerce layout problem:
http://www.mvixusa.com/shop/faqdesk_index.php?faqPath=13
This page seems to be missing a table tag but I can't for the life of me find it. All the other pages on that site work, but this one is being stubborn.
This page is generated by a bunch of OSCommerce PHP with a header and a footer and way too many tables. If you can help me find that missing table tag I might just be able to put a PHP bandaid on this particular page.
Thanks,
Rich
ADAM Web Design
01-26-2006, 03:02 AM
You know, if it were only one missing tag, you'd probably find someone smart enough to help you.
The problem is that it's a bunch of missing tags (for starters) and as a result, you need to find someone stupid enough to help you.
Fortunately, I just happen to be that stupid (and suffering from insomnia).
http://www.adamwebdesign.ca/wpw/rich_koi_test_2.html
As you can see, I've indented the code to try and figure out what was missing in terms of tags and where, and I've gotten most (if not all) of it isolated.
By the way...whatever you're charging these people to rework their site, double it and share it with some of us. I fixed maybe half of what is wrong or "not optimal"...if I wanted to, I could have spent at least another hour on it just cleaning up code.
And to your client, MviX, should you happen to read this: unfortunately, you guys had some butchers working on this thing. It's probably why you turned to richkoi (smart move, too!) The problem is that this is going to be 10 times as complicated a mess to fix as it should be.
Either give him what he wants to fix it or let him redo it from scratch (probably cheaper to do it from scratch.)
richkoi
01-26-2006, 12:54 PM
HAHA! Thanks Adam. I owe you.
This site is a template for OSCommerce, so I don't think we can pass the blame onto an old webmaster. He wants to upgrade the template anyways, so I am going to suggest seeking out a pure CSS template for this store. I am sure I could design one on my own but if there is a ready made solution out there, I'm more for it.
Thanks again for the help. Hopefully I can root out the problem now. This page is made up of about a dozen PHP files so it may take awhile to figure out which files those missing table tags are from.
Rich
richkoi
01-26-2006, 01:09 PM
Also, does anyone know of a site or software that you can check sites for missing or open tags?
Anything in the Macromedia suite that is good at this?
Thanks,
Rich
ADAM Web Design
01-26-2006, 01:13 PM
http://validator.w3.org would do it.
Mind you, in this case, it was too big a rat's nest to get through. Hence the indenting of the code.
And you're welcome. :)
webmaster@pinecone.com
01-26-2006, 05:58 PM
I find it helpful to remove inner tables from the HTML until I only have the tables needed to establish the structure of the page, then I start putting tables back in until it fails.
I agree that the code is a mess. Look at the table widths....your outermost table has a width of 900 and it contains a table that has a width of 976. You also have several rowspans and colspans. That doesn't help matters. You're also missing the 1st table row tag of your outermost table.
Like I said...take out all the inner tables to establish a structure, then start adding things in slowly...one table at a time. Also...turn on borders as you do this so you can actually see the table outlines. Using various border colors as well will help you see each table and cell as you work thru this.
Good Luck.
bjbtexas
01-26-2006, 11:14 PM
OScommerce uses a template, header, footer, boxes and includes. It’s not an easy problem to solve, you’ll have to look at it all. There is very good community at http://www.oscommerce.com/
The final html on OScommerce looks like hell and will always look like a rats nest of tables in html.
Since its just your FAQ look there.
mikmik
01-27-2006, 12:55 PM
Anything in the Macromedia suite that is good at this?
Are you using Dreamweaver already? I wouldn't suggest buying anything just for the tag checking, but I am sure that isn't exactly what you mean, LOL!
In DW MX, in the 'View' menu, go to the 'Code View Options' and put a check next to 'Highlight invalid HTML'
Also, DW shows the hierarchy of tags beneath the open document window, so if you click on the tag, it highlights all the code between the tags - like bracket matching in DW8. This is most excellent for seeing how much territory a tag is enclosing. Just click a tag in the code, then click it in the display underneath.
I have seen many softwares, such as phpbb, have multiple upon multiple invalidly nested, and rogue tags.
Try checking out a WPW page sometime, it is also a nightmare! To be fair, I haven't done that in a while, but it was very bad, :O)
Faglork
01-27-2006, 01:07 PM
Also, does anyone know of a site or software that you can check sites for missing or open tags?
HTML Tidy by David Ragget.
hth,
faglork
HTML Tidy by David Ragget.
There's a nifty version of HTML Tidy as a Firefox extension (https://addons.mozilla.org/extensions/moreinfo.php?id=249&application=firefox).
Deliguy
01-27-2006, 05:15 PM
Simple Template System (STS) <-------trust me install that oscommerce module. My oscommerce life was soooooooo much harder before I found that. It allows you to place your entire template into one html file and simply insert some <categories> <description> type tags, and customize individual pages/categories on your site really easily.
Also I use Textpad to edit my html files. It's awesome. Much better than notepad and you can press Cntrl-M and it'll find the matching tag/bracket/statement/whatever for everything. It'll also color code everything so it makes searching through your code much easier. I've been using textpad since the beta version over 8 years ago. I will never switch.
Did I mention it can open text files with million+ lines easily and smoothly. Now I'm just bragging. I should become a salesman for them :)
Anything in the Macromedia suite that is good at this?
Doesn't you see that if you switch for code view to design view (yellow text on my configuration).
Find related tags by clicking in lower left corner.
What about the results pane?
- Validation.
Plus a lot more.
- Target Browser Check (you have to configure the browsers that you want the code tested in).
- Link Checker
- Site Reports
- FTP Log
- Server Debug
richkoi
01-30-2006, 03:56 PM
Thanks for the suggestions everybody. I think I am going to redesign it using STS and CSS coding of my own. I'll let you know how it works out.