Recent Topics

1 Jan 12, 2006 21:56    

Hello there,

I just worked on my Blog design and started to add some entries using the

function to seperate teaser and full text. Something within this functions seems to break xml validity because when an article with

is active it comlplains and it validates correctly when removing the

tag.

<p class="bMore"><a href="http://www.maui.at/index.php?p=27&amp;more=1&amp;c=1&a

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Does someone know whats wrong?

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.maui.at%2F

Greetings,

Maui

2 Jan 12, 2006 22:45

It looks like the p tag in line 38 isn't closed before you open the new one. Nested p tags are not valid. That would also explain your second error: end tag for "p" omitted, but OMITTAG NO was specified .

38. <p>Das erste Halbjahr in der stressigen Abi Qualifikationsphase neigt sich dem Ende zu und heute konnte ich endlich meine sogar noch im alten Jahr verfasste zweite Informatik GK Klausur in Empfang nehmen. Doch was sah ich da unter meiner Klausur stehen...eine 2 plus. Sicher, eine 2 plus ist doch eigentlich eine ganz gute Zensur, doch irgendwie bin ich nicht zufrieden damit, was wohl auch daran liegt das ich immer noch den Zeiten hinterher trauere in denen es nun wirklich kein Problem war eine 1 (oder jetzt in der Oberstufe eine 1+ (15 Pts.)) zu erreichen.<br />
39. <p class="bMore"><a href="http://www.maui.at/index.php?p=27&amp;more=1&amp;c=1&amp;tb=1&amp;pb=1#more27">=> Lies mehr!</a></p>
40. </div>

3 Jan 12, 2006 23:09

I just checked my main.php
and the following code calls the posts

		<div class="bText">
			<?php $Item->content(); ?>
			<?php link_pages() ?>
		</div>

Is it a bug of Phoenix that the p tag isn't closed when using <!--more-->
I don't know any other solution because I actually don't set any p tags in my posts (I'm using auto P)

Greetings,

Maui

4 Jan 12, 2006 23:44

What happens when you don't have auto p turned on?

5 Jan 12, 2006 23:59

Well, If I turn Auto p of the Site passes validation however the site isn't so nice formatted as with auto p on and i really don't want to manually format every post I make...is there another solution

perhaps it is a bug within Phoenix

6 Jan 13, 2006 00:07

It may be a bug. Remember, Phoenix is in alpha now. I'm not even using it on my main blog. Let's keep testing. Turn on auto p and make a post with a couple of paragraphs, but no <!-- more --> tag. Then check validation and see if the p tags are getting closed. That may tell us if the more tag causes the problem, or if it's a general problem with the auto p plugin.

7 Jan 13, 2006 00:12

Try this. After your first paragraph of text do only one 'return' then your !M then one more return then the rest of your text. Like this:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed hendrerit dolor ac wisi lobortis auctor. Nulla accumsan nunc vitae sem. Nam nonummy metus a risus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
<!--more-->
Lorem ipsum baby: Lorem freakin ipsum!! Consectetuer adipiscing elit. Sed hendrerit dolor ac wisi lobortis auctor. Nulla accumsan nunc vitae sem. Nam nonummy metus a risus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

Lorem ipsum dolor sit amet rocks you like a hurricane, and can even consectetuer your adipiscing elit. Sed hendrerit dolor ac wisi lobortis auctor. Nulla accumsan nunc vitae sem. Nam nonummy metus a risus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

Alternatively, make sure you have 'enter enter' before AND After your !M link, though I've not tested that method. For me I have no text visible at the "read more" link after the visitor follows, so I don't want an empty paragraph there.

I use both auto-P and !M without causing validation errors, though I just now noticed I've got errors due to stuff other than this. For the record I'm using 1.7 Beta up-to-date as of a few days ago.

8 Jan 13, 2006 00:14

By the way I don't think this is a bug. It's more along the lines of potential issues when one chooses to use multiple options, which means it's a manual issue, but not a bug.

9 Jan 13, 2006 00:16

I'm running b2evolution 1.7-beta CVS on my development blog and I can't replicate this problem. It's closing the p tag like it should. So, maybe this was a bug in the alpha and it's already fixed.

10 Feb 07, 2006 00:40

Just wanted to add my testimony in verifying this bug in 1.6... When using <!--more-->, <p> tags aren't handled properly; either they aren't opened, or aren't closed - and it seems to be that when they aren't opened, there happens to be the opening tag of a block level element immediately preceding (for instance, I'll have a <div> to contain the text, and Auto P doesn't bother to put an opening paragraph tag for that first set of text; but it does put the closing tag at the end of the paragraph).

And without <!--more-->, paragraph tags are done properly by Auto P.

Guess I'll switch up to 1.7!

Thanks,
JazzCrazed

11 Feb 17, 2006 18:01

So I've just now upgraded to version 1.7-beta on my local machine for testing purposes, and this bug still sort of exists. Here's what's causing the issue:

Currently, I use a specially classed <div> to style the paragraphs that precede the <!--more-->. If I write my post as follows with "auto-P" checked:

<div class="special">
Here is the first paragraph of my text.

Here is the second paragraph of my text.
</div>
<!--more-->
Rest of my text...

Here's how it gets rendered:

<div class="special">
Here is the first paragraph of my text.</p>

<p>Here is the second paragraph of my text.
</div>
<p><a id="more001" name="more001"></a><br />
Rest of my text...</p>

One lines-worth of space needs to be put between the div tags and the actual text therein in order for the paragraph tags to be opened and closed properly. So it needs to be changed as such:

<div class="special">

Here is the first paragraph of my text.

Here is the second paragraph of my text.

</div>
<!--more-->
Rest of my text...

Once this is done, it renders just fine:

<div class="special">

<p>Here is the first paragraph of my text.</p>

<p>Here is the second paragraph of my text.</p>

</div>
<p><a id="more001" name="more001"></a><br />
Rest of my text...</p>

But, if you don't use a div, or I'm presuming most any other kind of block element, to surround your text prior to <!--more--> (which I anticipate is the case for most people), then auto-P works properly.

So Maui, check to see if that's what's happening for you. I have yet to see if the same is true with version 1.6.

Maybe this isn't a bug much more than it is a knowing-usage issue, but it is a change from how things were before, and posts not done properly for 1.6/1.7 (as were all of my 0.9 posts) will have to be changed in order to validate.

12 Feb 17, 2006 19:26

The Auto-P plugin is buggy!

It should only "replace newlines"/create paragraphs inside of given tags and at the outmost level, but it does not.

I've started fixing this locally, but it's not that easy and would need additional functions which I was tired of eventually being rejected from the core that time.

If I get bored/interested in it again, I'll look further into it.

13 Feb 17, 2006 22:40

blueyed,

If it's buggy, it's tolerably so, now that I know how it acts. It's no big deal for me to just keep a blank line in between paragraphs and their enclosing tags prior to the <!--more-->.

Although ideally, of course, it shouldn't generate invalid XHTML if the post as it's typed is valid, in itself.

Thanks for investigating it!


Form is loading...