To keep it simple, I put it under sites/default/files/migrate/products. Label : 'Product description' selector : descriptionĭefault_value : 0 uid : plugin : default_valueĭefault_value : 0 migration_dependencies : dependencies : enforced : module : - migrate_test Label : 'Unique product identifier' selector : upc # The URL of your JSON datasource urls : http ://v/sites/default/files/migrate_test/products.json I took the 'Product' example from Jeff Geerling that explained the migrate_source_json which is now part of the migrate_plus module, with the slight differences mentioned hereunder for migrate_plus. , and Migrate Tools for drush commands and UI we are now really empowered for custom migration.īased on the article from Jeff Geerling ( Migrate a custom JSON feed in Drupal 8 with Migrate Source JSON) + the numerous examples from Migrate Plus, I decided to roll a minimal JSON test to get started quickly. When we look at contrib modules like Migrate Plus that comes with loads of examples for Rest / JSON /. Things have evolved quickly, we have now a huge bunch of helpers since 8.2.x in core for Drupal to Drupal migration: Migrate, Migrate Drupal and Migrate Drupal UI. I was especially interested in the JSON and XML formats that are quite popular and easy to produce as output with Rest or even RSS. Once I did the mapping I went to Content, Feeds tab and I created a new feed called EN-CV Project JSON Feed and I entered the Drupal 7 JSON Feed URL and clicked Save and Import.Īs you can see from the images below the content was imported successfully.After spending some time on experimenting custom migration for Drupal 7 contents at the early stages of Drupal 8.0.0, I decided to have a look again at what the core and contrib migrate modules have out of the box for custom cases: let's say data structure change from another CMS, or even from a previous version of Drupal. To map them correctly you select the Target field and then in the Source field you click the dropdown list and select New source… and you type the name of the field exactly as it is in the Drupal 7 JSON feed. Then in mappings I mapped only three fields for the test (Title, Project number and Status). I set the Fetcher value to Download from URL and the Context value under mapping to $.nodes.* Then I went back to your Drupal 8 website and I setup a new Feed in Feed types called EN-CV Project JSON Feed I had to remove all the fields from Drupal 7 view because they had spaces in their labels here and make a test only with three fields and replacing the spaces with underscore (e.g. I tried to import the feed in your Drupal 8 website but was giving me errors due to the spaces in the Feed’s fields. I have changed the settings here Īfter I cleared the caches and the URL was accessible as anonymous. So I changed its settings here Įven after this change the view still was not accessible and this is because you use the Field Permission module and it was enabled for the field Status so no anonymous users can see it. So your link should have been http and not https.Īnyway even with http the view was not accessible because the EN-CV content type is using the Content Access module and is set so anonymous users can’t see nodes of this content type. When you visit a Drupal 7 website in https it forces SSO. Then go to Content, click on the Feeds tab and create a new Feed of type of the one you just created in Feed types and enter the URL of Drupal 7 website’s JSON Feed and import. Once you have set all these up go to Structure->Feed types and create a new Feed with parser ‘JSONPath’, set up the mappings between the feed and the content type and Save. In addition, prepare the HTTP redirect module that will map the old SharePoint URLs to the new Drupal URLs. Set up Drupal 8 on a test machine, and configure Drupal as designed earlier. You need the module Feeds extensible parsers and enable Ludwig module as well for the external libraries. Automation is the key to extracting contents from SharePoint while keeping existing formatting information intact. To import the data from the JSON feed into your Drupal 8 website follow the guide on Drupal tools website. Create a path for the view and go to that path to see your data in JSON. Once you have installed it create a view with format ‘JSON Data Document’ to display fields from the content type you want. This will allow you to export the content in JSON format via Views. Go to your Drupal 7 website and install this module
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |