Link Checker is not compatible with the Field Collections module.

Files: 
CommentFileSizeAuthor
#8 field-collection-compatibility-1888102-8.patch1.58 KBmdixoncm
PASSED: [[SimpleTest]]: [MySQL] 159 pass(es).
[ View ]
#7 field-collection-compatibility-1888102-7.patch1.31 KBSamvel
PASSED: [[SimpleTest]]: [MySQL] 159 pass(es).
[ View ]
#6 field-collection-compatibility-1888102-6.patch1.35 KBSamvel
PASSED: [[SimpleTest]]: [MySQL] 159 pass(es).
[ View ]

Comments

Status:Active» Postponed (maintainer needs more info)

Repro plan? Patch?

Issue tags:-Field collection

Version:7.x-1.0-beta1» 7.x-1.x-dev
Status:Postponed (maintainer needs more info)» Active

Reproduced this and made a node dump that shows that only a reference is visible in the node object and not the raw data. This does not integrate in current logic's and requires a lot of extra work. I'm not going to work on this myself.

So to get this going, apply #1946252: Create hooks to allow modules to extract and replace links then add something like so in your custom module

/**
* Implements hook_linkchecker_extract_node_links().
*/
function MYMODULE_linkchecker_extract_node_links($node) {
  $text_items = array();
  list($id, $revision, $bundle) = entity_extract_ids('node', $node);
  $instances = field_info_instances('node', $bundle);
  $wrapper = entity_metadata_wrapper('node', $node);
  foreach ($instances as $instance) {
    if (($field = field_info_field($instance['field_name'])) &&
        ($field['type'] == 'field_collection')) {
      foreach ($wrapper->{$instance['field_name']} as $item) {
        $text_items[] = render($item->view());
      }
    }
  }
  return $text_items;
}

Works a treat.

So to get this going, apply #1946252: Create hooks to allow modules to extract and replace links then add something like so in your custom module

/**
* Implements hook_linkchecker_extract_node_links().
*/
function MYMODULE_linkchecker_extract_node_links($node) {
  $text_items = array();
  list($id, $revision, $bundle) = entity_extract_ids('node', $node);
  $instances = field_info_instances('node', $bundle);
  $wrapper = entity_metadata_wrapper('node', $node);
  foreach ($instances as $instance) {
    if (($field = field_info_field($instance['field_name'])) &&
        ($field['type'] == 'field_collection')) {
      foreach ($wrapper->{$instance['field_name']} as $item) {
        $text_items[] = render($item->view());
      }
    }
  }
  return $text_items;
}

Works a treat.

Status:Active» Needs review
StatusFileSize
new1.35 KB
PASSED: [[SimpleTest]]: [MySQL] 159 pass(es).
[ View ]

Hi Guys, patch ready

StatusFileSize
new1.31 KB
PASSED: [[SimpleTest]]: [MySQL] 159 pass(es).
[ View ]

was small mistake. new patch appended

Issue summary:View changes
StatusFileSize
new1.58 KB
PASSED: [[SimpleTest]]: [MySQL] 159 pass(es).
[ View ]

Loving the patch - and it's working nicely - however, if you do end up with a broken link in the field collection then currently it is not possible to view this in the report - I have updated the patch to allow the linkchecker to add field_collection fields to the list of fields it does it's access control checks on ...