I presume that duplicated content generated by the field collection view and the source node is obviously bad for SEO purposes.
I use to deal with the Rabbit Hole module to avoid duplicate content, however I can't figure out how to use it with field collections.
Anyone has a related experience ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

olofbokedal’s picture

Not sure what you mean about duplicated content. What you want, is to redirect the user to the main node if he's viewing a field collection entity?

pedrosp’s picture

Field collections for my purpose are merely a piece of content of a master node, that's why I don't want them to be visible and searchable outside the master node. That's exactly what Rabbit hole module is aimed for, but it is not possible to handle field collections.
For the record, I walk away from field collections because it lacks some other entity integrations like entity translation.

olofbokedal’s picture

Because of the hook system that Rabbit Hole is based on, it should be quite easy to extend it to cover Field Collections. I'd imagine that there are more sites that are using Field Collections in the same manner as you used to, so I'll look into this in a couple of weeks.

BBC’s picture

+1 for extending this module to include field collections

Pere Orga’s picture

Hey, I'm also interested on this.

Did you get any far implementing it?

What I don't see is where the display settings would be. Field collections are entities but have a "field" behaviour; they don't have a "edit Field collection" page, just "manage fields" and "manage display".

olofbokedal’s picture

No, I haven't done anything regarding this issue yet.

Didn't think about the difference from a "regular" entity. If the only pages are "manage fields" and "manage display" I can't think about a good location from the top of my head.

Please feel free to keep posting and researching :)

olofbokedal’s picture

This is some tricky business. The most logic place to put the settings would be among the field settings for the Field Collection field. But I'm not sure it's possible to store the Rabbit Hole settings in the same manner as for other entities.

Pere Orga’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Issue summary: View changes
Status: Active » Needs review
FileSize
3.74 KB

Hi again.

I'm attaching a patch that adds rh_field_collection module. It is based on rh_node module and for my tests everything is working as expected. I followed your idea of inserting the Rabbit Hole settings in the field settings page.

Pere Orga’s picture

I've added the module in a sandbox too: https://www.drupal.org/sandbox/netol/2362931

olofbokedal’s picture

Status: Needs review » Fixed

Thanks! This has been committed to 7.x-2.x.

Status: Fixed » Closed (fixed)

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