I am having a problem with fences preventing schema.org from mapping fields. This happens even though I have fences field and global set to default (Use the default wrapper markup from Drupal (nested divs). )

Comments

manuel garcia’s picture

Yep, confirming...

Clemens Sahs’s picture

Issue summary: View changes

I can confirming this bug, too

Is there any work in Progress?

jesss’s picture

Fences leaves the $item_attributes[$delta]; variable out of its templates. Adding it back in seems to fix the issue.

<?php foreach ($items as $delta => $item): ?>
  <div class="<?php print $classes; ?>"<?php print $attributes; ?><?php print $item_attributes[$delta]; ?>>
    <?php print render($item); ?>
  </div>
<?php endforeach; ?>
zgurb’s picture

Hi @jesss,

Where to add this?

jesss’s picture

@zgurb, you add it to the tpl.php template files: field--fences-div.tpl.php, etc. You should copy them over to your theme, first, though.

drupalgideon’s picture

This won't work for the "no wrapper" or "figcaption" templates, however.

johnalbin’s picture

Status: Active » Closed (duplicate)

#2568833: <div> wrapper doesn't support item attributes has a patch. Marking this one as a duplicate