Recent Topics

1 Oct 14, 2005 15:48    

Hi, I am trying to insert a HTML table into evo. It works fine as HTML, but when parsing in evo it errors.

This is the code:

<table width="100%" cellspacing="2" cellpadding="4" border="0">
<tr>
<th colspan="3">
<h2><a name="URL"</a></h2>
</td>
</tr>

<tr>
<td colspan="3"><h3><a name="URL">TEXT</a></h3>
</tr>

<tr valign="middle" align="center" bgcolor="#AAAAAA">
<th>Name</th>
<th>Description</th>
<th>Default
<br />
<small>(when not present)</small></th>
</tr>

<tr valign="middle" align="left" bgcolor="#eeeeee">
<td><tt>controlport</tt></td>
<td>text</td>
<td>7777</td>
</tr>

<tr valign="middle" align="left">
<td><tt>controlallow</tt></td>
<td>text here</td>
</tr>

<tr valign="middle" align="left" bgcolor="#eeeeee">
<td><tt>uid</tt></td>
<td>text here</td>
<td>0</td>
</tr>

<tr valign="middle" align="left">
<td><tt>gid</tt></td>
<td>text here</td>
<td>0</td>
</tr>

<tr valign="middle" align="left" bgcolor="#eeeeee">
<td><tt>balancer!enabled</tt></td>
<td>text here</td>
<td>no</td>
</tr>

<tr valign="middle" align="left">
<td><tt>errlog</tt></td>
<td>text here</td>
<td><tt>/web/log/errors</tt></td>
</tr>

<tr valign="middle" align="left" bgcolor="#eeeeee">
<td><tt>errlevel</tt></td>
<td>text here<td/>
<td>6</td>
</tr>
</table>

And here are the errors b2evo throws out:

# Tag th may not have attribute colspan
# Tag tr may not contain raw character data
# Tag h3 is not allowed within tag tr

I'm pretty new to all this, and have searched google and the other forum posts, but can't see any specific queries similar to mine. Any help greatfully received.

Many thanks,
ahxcjb

2 Oct 14, 2005 17:32

There are a couple of errors in your HTML. It may look fine in your browser (which is probably somewhat forgiving), but a strict parser is not going to allow it. Try the following:

1. Change all <th></th> tags to <td></td> tags (the <th> tags are not really being used correctly, and you have some mis-matched pairs).

2. Make sure all tags are closed properly (i.e. - there is a missing </td> on line 9)

See if that clears it up.

3 Oct 14, 2005 17:34

Many thanks. I have one other thing to do, and then I will replace the tags and try and parse again.

Very much appreciate your reply,

Cheers,
Chris

4 Oct 30, 2005 04:06

Hi, nope, no luck :(

I still get errors:

# Tag td may not have attribute colspan
# Tag td may not have attribute colspan
# Tag tr may not contain raw character data

Please someone help :(

Thanks,
Chris

5 Oct 31, 2005 18:28

Oops. I was trying to edit Kweb's post to disable smilies so it would display correctly and I accidentally deleted it. I used the back button to recover the text:

# Tag tr may not contain raw character data

This means you did not make sure to close all your tags properly. Somewhere, you are closing a row (</tr>) without closing the last cell (</td>).

The other two, I'm not sure about, because the colspan attribute is listed as allowed in my _formatting.php file. What version of b2evolution are you using? Maybe it was not listed in an older version.

Check your _formatting.php file (in the conf folder) and look for this line (line 301 in my file):

'td' Arrow A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign.' nowrap bgcolor width height',   // Transitional

If colspan is not listed on that line, you can add it yourself. Just make a backup of your file before you do any editing!

6 Oct 31, 2005 18:33

Ah, v. interested re colspan entry in my PHP file. I will have a word with our PHP administrator for the site i'm working on and ask him to do this! :)

I'll have a go at these tags a bit later on in the week and report back.

once again, much appreciate your help.

Many thanks,
Chris

7 Oct 31, 2005 18:37

It's not a PHP administration thing, it's a part of your b2evolution installation (in the 'conf' folder).

8 Oct 31, 2005 18:45

Thanks for your help, Personman. I need to re-check after I post for stuff like that.

The line should look like this

	'td' => A_attrs.' abbr axis headers scope rowspan colspan'.A_cellhalign.' '.A_cellvalign.' nowrap bgcolor width height',	// Transitional

9 Nov 04, 2005 18:12

I think we might have uncovered a bug here..

There was no leading space after 'colspan'. I've changed it to read 'colspan ' and now my data parses.

Who should I log this bug with?

many thanks,
Chris

11 Nov 05, 2005 02:36

So am I ! :))

Once again, many thanks for all your help. I'll create a bug post on monday back at work.

Cheers,
Chris


Form is loading...