Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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:
Comments
Comment #1
batigol CreditAttribution: batigol commentedAnybody ?
Comment #2
kelutrab11 CreditAttribution: kelutrab11 commentedAfter 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.
Comment #3
marcingy CreditAttribution: marcingy commentedComment #4
batigol CreditAttribution: batigol commentedIt's not a bug ? Is there any way I can change duplicate drupal block id name ?
Comment #5
kelutrab11 CreditAttribution: kelutrab11 commentedAny ideas how to resolve this ?
Comment #6
pwiniacki CreditAttribution: pwiniacki commentedHmmm 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.
Comment #7
cilefen CreditAttribution: cilefen commentedDoes this help? http://drupal.stackexchange.com/questions/46105/can-i-render-the-same-bl...
Comment #8
pwiniacki CreditAttribution: pwiniacki commented@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:
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