<div class="field-item even" rel="og:image rdfs:seeAlso"> on line 11
- The attribute 'rel' may not appear in tag 'div'.
   [code: DISALLOWED_ATTR  category: DISALLOWED_HTML]
   ACTION TAKEN: div.rel attribute was removed due to validation issues.

I could not remove this property using amptheme_preprocess_field().

This rdf attribute is set when you install using the standard install profile: https://api.drupal.org/api/drupal/profiles%21standard%21standard.install...

  // Insert default pre-defined RDF mapping into the database.
  $rdf_mappings = array(
    array(
      'type' => 'node',
      'bundle' => 'page',
      'mapping' => array(
        'rdftype' => array('foaf:Document'),
      ),
    ),
    array(
      'type' => 'node',
      'bundle' => 'article',
      'mapping' => array(
        'field_image' => array(
          'predicates' => array('og:image', 'rdfs:seeAlso'),
          'type' => 'rel',
        ),
        'field_tags' => array(
          'predicates' => array('dc:subject'),
          'type' => 'rel',
        ),
      ),
    ),
  );
  foreach ($rdf_mappings as $rdf_mapping) {
    rdf_mapping_save($rdf_mapping);
  }
CommentFileSizeAuthor
#4 2755713-4-remove-field-rel.patch656 bytesrainbowarray

Comments

Dave Reid created an issue. See original summary.

dave reid’s picture

Seems that rdf_preprocess_field() always runs *after* amptheme_preprocess_field. Maybe we should be using amptheme_process() instead?

rainbowarray’s picture

It seems like theme preprocess functions should run after module preprocess functions, right? Otherwise how would theme preprocess functions ever take advantage of variables added in module preprocess functions? Hmmm. I'll look into this.

rainbowarray’s picture

StatusFileSize
new656 bytes

We were not removing rel from preprocess_field. I hadn't seen how it could sneak in there, but the answer apparently is an install hook. So now that is being removed. Thanks for the catch davereid!

rainbowarray’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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