validator:

 Line 717, Column 14: ID "block-locale-language" already defined 
    <div id="block-locale-language" class="block block-locale">

✉ 

 An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element). 
 Line 123, Column 14: ID "block-locale-language" first defined here 
    <div id="block-locale-language" class="block block-locale">

Inside page.tpl.php:

		<?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? How to copy a block in d7?

Related:

http://drupal.org/node/111719
http://drupal.org/node/766146

Comments

batigol’s picture

Anybody ?

kelutrab11’s picture

After checking my page in validator I have the same problem. My block id is duplicated when I try to display my menu in two places.

marcingy’s picture

Category: bug » support
batigol’s picture

It's not a bug ? Is there any way I can change duplicate drupal block id name ?

kelutrab11’s picture

Any ideas how to resolve this ?

pwiniacki’s picture

Version: 7.12 » 7.38
Category: Support request » Feature request
Issue summary: View changes

Hmmm when try to display a block twice on a page I get this validation problem. Maybe we should use class and not an id when render and target a block?

Active on drupal 7.38. I guess it's a feature request then, to change block module behavior. I would really like to hear more opinion on this.

cilefen’s picture

pwiniacki’s picture

@cilefen ahhaha. Didn't think about this in that way, I guess I would have never invent this :P THANKS!

@Oleksiy Stepaniuk idea is working extremly well:

<?php $homepage_video = $page['homepage_video']; ?>
<?php print render ($page['homepage_video']); ?>

first video block

bleblebleble some code blebleble

<?php print render ($homepage_video); ?>
second video block

diffrent block id '--2' and it validates. Great!

Now the only think left is - https://www.drupal.org/node/2536966

Version: 7.38 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.