I found that we were getting a number of false positives that were traced back to some admin-only 'hidden' fields that we have to suppliment the revision log.
On our site some editors paste in emails verbatim as part of the change control.
In short, some textareas that never get displayed were being checked for links and making noice.
Is there a possibility for linkchecket to either : exclude some fields - or : like 'search' does, expose a specific 'view mode' for things that should and shouldn't be searched?
Maybe it's an edge case, but it was a bit of a surprise here..
Comments
Comment #1
hass commentedThis is currently not possible. It sounds like an edge case, but something that could be implemented. If you provide a patch we may get this in. Shouldn't be a big trick.
Comment #2
kikia commentedI think this is related to this topic since we are looking for potential ways to hide a field from the link checker.
Does the Link Checker check the revisions tab on a node? Some of our users would like to keep nodes with broken URLs handy so that when the URL becomes live again, they can revert to the previous revisions. Apparently, these are links that may be taken down with the intention of being put back with new content/same URL.
Thanks!
Comment #3
hass commentedContent of revisions is never checked. Only links in live content is checked to prevent false alarms in outdated revisions. Linkchecker cares about the LIVE site to keep the internet (linking) up and running, not anything that is offline (or unpublished).
Comment #4
kikia commentedPerfect! Thank you.
Comment #5
hass commentedFeel free to share a patch to exclude fields from scanning. Please reopen once you have a patch ready.
Comment #6
mikedye commentedKLUDGE AND BAD PRACTICE WARNING:
You can remove individual fields from being scanned by editing the linkchecker.module file and unsetting the field name entry in the $text_items_by_field array.
1057: // Add fields typically not used for urls to the bottom. This way a link may
1058: // found earlier while looping over $text_items_by_field below.
1059: $text_items_by_field = array_merge($text_items_by_field, linkchecker_parse_fields('node', $node, $node->type, TRUE));
1060: $text_items_by_field['title'][] = _filter_url($node->title, $filter);
1061:
1062: // remove a field you don't want to scan
1063: unset($text_items_by_field['machine_name_of_field_to_remove']); // <--------------------------- add this
1064:
1065: $text_items = _linkchecker_array_values_recursive($text_items_by_field);
Comment #7
mikedye commentedKLUDGE AND BAD PRACTICE WARNING:
You can remove individual fields from being scanned by editing the linkchecker.module file and unsetting the field name entry in the $text_items_by_field array.
1057: // Add fields typically not used for urls to the bottom. This way a link may
1058: // found earlier while looping over $text_items_by_field below.
1059: $text_items_by_field = array_merge($text_items_by_field, linkchecker_parse_fields('node', $node, $node->type, TRUE));
1060: $text_items_by_field['title'][] = _filter_url($node->title, $filter);
1061:
1062: // remove a field you don't want to scan
1063: unset($text_items_by_field['machine_name_of_field_to_remove']); // <--------------------------- add this
1064:
1065: $text_items = _linkchecker_array_values_recursive($text_items_by_field);
Comment #8
mlncn commentedWhich view mode *is* used? It needs to choose one right?