Closed (fixed)
Project:
Content Synchronization
Version:
8.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2017 at 08:53 UTC
Updated:
17 Jun 2017 at 20:59 UTC
Jump to comment: Most recent
Comments
Comment #2
blanca.esqueda commentedHi 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.
Comment #3
mrpauldriver commentedThank 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.
Comment #4
blanca.esqueda commentedHi Paul,
If the related sites are clones of the same one (share same site UUID), then yes you can exchange/share content.
Cheers,
Blanca
Comment #5
mrpauldriver commentedNo they wouldn't be clones and would be fairly independent each other.
Comment #6
chris.smith commented@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.
Comment #7
chris.smith commentedComment #8
mrpauldriver commentedThank 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
Comment #9
chris.smith commentedHi @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.
Comment #10
chris.smith commentedAssigning credit and closing.
Comment #11
mrpauldriver commentedWow. I'm looking forward to evaluating this.