I wanted to check if the admin pages were producing valid xHTML so made this page public:
http://drupal7.dev.openconcept.ca/node/add/article

And ran it through:
http://validator.w3.org

Ran into these two errors:
Line 96, Column 116: ID "title-wrapper" already defined
Line 109, Column 151: ID "body-wrapper" already defined

I'm not 100% sure where this duplicate is being added:

<div class="field-type-text field-name-title field-widget-text-textfield form-wrapper" id="title-wrapper"><div id="title-wrapper">

...

<div class="field-type-text-with-summary field-name-body field-widget-text-textarea-with-summary form-wrapper" id="body-wrapper"><div id="body-wrapper">

But the latter one should likely get removed from the form.

Comments

jergason’s picture

Status: Active » Fixed

Just checked on a new installation of HEAD and this does not appear to be a problem anymore. I went to /node/add/article, copied the markup, and pasted it into the w3 validator without any html errors.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

batigol’s picture

I have this issue now:

		<?php if ($page['language']): ?>
		<div class="language"><?php print render($page['language']); ?></div>
		<?php endif; ?>
		<?php if ($page['language']): ?>
		<div class="language"><?php print render($page['language']); ?></div>
		<?php endif; ?>

= duplicate id in validator - how to fix this ?

mgifford’s picture

I don't see any way that id's are even being expressed in this @batigol. Is there something missing? There should be an id="" somewhere.

batigol’s picture

@mgifford try to add 2 same blocks at page.tpl.php - this code is from my page.tpl.php I got two same block in it, so I guess default drupal id's added to blocks are the problem. Maybe there should not be any ID added by drupal by default, only the classes ? Then users could add their ID, well some of them.

mgifford’s picture

That would produce other problems.

I think we'd need to hear a good example of where you'd want to have two of the same Core block on the same page to really understand.

batigol’s picture

I dosen't matter what I want. I simply thought that there is no problem to display two same block at drupal page without validation problems.

Users could want to display syndicate, language or other block twice at the page to achieve better usability or whatever they think off. If it's a big problem for drupal then I would simply ignore 100% validation I can live with that, drupal give me more than validator :)

I just want to report this, and saw this issue. It could help other ppl that are surprised what is going on with those ID's and if it's fixable. I'm sure you are right, there are more important things to fix/add in drupal. Cheers.

pwiniacki’s picture

Issue summary: View changes
Status: Closed (fixed) » Closed (duplicate)