×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [SOLVED] W3C Validation Error

[SOLVED] W3C Validation Error 11 years 5 months ago #21206

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Hello,

I get a W3C validation error for the comment form token input:
No p element in scope but a p end tag seen.
 
…="hidden" name="db8da1fdd210fcc58a4b237b947ec645" value="1" /></div></p>	</div>

This happens with the default template.

In default.php, line 154-156 the form token JHTML is echoed:
<div id="ccomment-token" style="display:none;">
	<?php echo JHtml::_('form.token'); ?>
</div>

The HTML output is:
<div id="ccomment-token" style="display:none;">
	<input type="hidden" name="06f8e52bd60f1bce8b9f7f5185a5139a" value="1" /></div></p>	</div>

I would like to eliminate the closing </p> tag here.

Where do I find the function in Joomla core that puts out the form token input? I googled already but couldn't find it.

Sorry, I don't mean to be picky, but my client requires me to have full W3C validation.

W3C Validation Error 11 years 5 months ago #21207

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
You have something else that is most probably editing the html output. I just checked it here and the result for me is:
<div id="ccomment-token" style="display:none;">
	<input type="hidden" name="d0d436ff6368de2320eb801618a78080" value="1" /></div>  </div>

As you can see there is no paragraph there.

W3C Validation Error 11 years 5 months ago #21210

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
Thank you for checking.

Then I will have to find out where the </p> is coming from ...

W3C Validation Error 11 years 5 months ago #21211

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
One more question:

What Joomla version are you on?

I'm on 3.1

W3C Validation Error 11 years 5 months ago #21217

  • Gerhard Sitzmann
  • Gerhard Sitzmann's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 41
  • Thank you received: 0
SOLVED

The p tag came from jce editor.

I inject the {ccomment on} code through a free text field in SEBLOD.

In the free text field, JCE added p tags.

So there was an opening <p> and a closing </p> around the whole ccomment code. The W3C validator didn't recognise the opening p tag.

I switched the p tags off in JCE global configuration and now all is fine B)

W3C Validation Error 11 years 5 months ago #21219

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
There we go :)

Cheers!
  • Page:
  • 1
Time to create page: 0.130 seconds