If I understand correctly it sounds like the intended use case would be for developers to move content between dev environments.

Could this module be used as alternative to Feeds or Domain Access for sharing selected content between related websites?

I am working with a group of schools who have such a need.

Comments

MrPaulDriver created an issue. See original summary.

blanca.esqueda’s picture

Hi Paul,

I think there are two points on your question:

1.- Share selected content.
Currently you can select import/export a single content entity or the entire site content entities.
Of course you can manually filter the YAML files that you want to import --- one YAML file = one content entity.

After finishing the sync screen, there are plans to add a screen where the content entities to be exported can be selected.

2.- Related Websites
Currently the module is checking the site UUID to make sure that it is the same site even if it is on a different environment (local, dev, stage, prod,..). The site UUID validation mainly is to make sure that the content entities to be imported exist and field types and attributes match the entity configuration.

If your related sites are clones of the same one then they share the same site UUID, and if they still sharing content entities configuration (content type machine names, taxonomies, fields...) then the sync would work.

Now, if the sites don't share the same UUID some workarounds still can be done. I had a similar need not long ago, so I used the module overriding the site UUID validation. The import was successful because the taxonomies and content types had the same machine names and the same fields.

Because the need to move content between different sites is not uncommon and different scenarios can be faced:
1.- field exist in YAML but not in the site entity
2.- field exist in the site entity but not in YAML
3.- field type in the YAML is different that the one in the site entity
4.- content uuid already exist but it is assigned to a different entity type/bundle.
5.- ....
We still looking for the best ways to handle the above and let the user decide if skip the record, save anyway with an empty fields or default values, etc.. But this would be implemented in a future release.

mrpauldriver’s picture

Thank you for such a comprehensive answer Blanca.

Speaking as a D7 site builder, I am not yet up to speed with all the Drupal 8 terminology, and therefore quite a bit of your answer goes over my head.

Only to say that I am looking for something that this easy to set up, which would enable related sites to exchange/share content.

blanca.esqueda’s picture

Hi Paul,

If the related sites are clones of the same one (share same site UUID), then yes you can exchange/share content.

Cheers,
Blanca

mrpauldriver’s picture

No they wouldn't be clones and would be fairly independent each other.

chris.smith’s picture

@MrPaulDriver

The reason the module is restricted to import and export from the same site (or clones), is because it is important that both sites have the same content types and fields. Otherwise, the import may not work properly.

If you have the same content structure across both independent sites, you can alter the export files and trick the module into allowing you import content from one site to another.

With that said, we're going to take your requirement into consideration as a potential future feature for this module.

chris.smith’s picture

Component: Documentation » Code
Category: Support request » Feature request
mrpauldriver’s picture

Thank you for the extra detail Chris.

And yes I would have a situation where the content types and fields would be the same. Not sure if I was misunderstanding Blanca's meaning of 'clone'.

Content syndication between related sites seems to be a fairly common use case and I've been doing quite a bit of research about it. There does not seem to be an easy or common way of dealing with the task, and it would great to arrive at a solution suitable for site editors.

Some other considerations might be;

- How to deal with content updates at either endpoint?

- How to manage SEO and canonical metatags?

- Whether the syndication network would operate around a content hub or whether it could be peer to peer?

---------

Some links below, describing how others have approached this.

- https://www.isovera.com/blog/syndicate-content-between-drupal-websites-h...

- https://www.drupal.org/project/shared_content

- https://www.lullabot.com/articles/content-syndication-using-services-and...

- https://www.previousnext.com.au/content-sharing

- https://ffwagency.com/de/blog-zu-digitalstrategie/content-sharing-drupal...

- https://drupal.stackexchange.com/questions/137967/sharing-only-one-conte...

- https://www.drupal.org/project/deploy

chris.smith’s picture

Version: 8.x-1.x-dev » 8.x-1.2
Status: Active » Fixed

Hi @MrPaulDriver,

I wanted to let you know that we have just recently released our recommended version of the module, and we have included the ability to synchronize content across multiple sites, as per your recommended.

To do so, install the module and configure it to "Bypass site uuid validation". Once the bypass has been enabled, you will be able to easily import content from across different sites.

Thank you for your feedback and help in the development of this module.

chris.smith’s picture

Status: Fixed » Closed (fixed)

Assigning credit and closing.

mrpauldriver’s picture

Wow. I'm looking forward to evaluating this.