1

I have migrated Drupal 7 website to Drupal 8 version using the core migrate_drupal_ui module successfully but the paragraph module was broken upgrade path which results in final that the paragraph bundles not migrated and I have created in the new site like the old.

Now I need to migrate content for the paragraph fields only and update the nodes, I did some research and found possible solutions as follows:

1- Custom migrate plugin But I don't know how to edit existing.

2- custom script to read the nodes from other site by creating feeds and update.

//$nid get from feeds.
$entity = entity_load('node', $nid);

$entity->set('field_audit', 
['field_number' => [0 => ['value' => 4]], 
'field_regular_materials' => [0 => ['value' => '44']], 
'field_verification' => [0 => ['value' => '444']]], FALSE); 

$entity->save();

That code gives error Fatal error: Maximum function nesting level of '256' reached, aborting!

what is the best practice to achieve.

closed as primarily opinion-based by kiamlaluno Jan 18 '18 at 17:03

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • This nesting error seems like a php settings issue which is related to the XDebug PHP extension. Have you tried this in your php.ini file? xdebug.max_nesting_level = 512 – jepster Apr 2 '17 at 16:27
0

I would approach this differently. Using PHPMyAdmin or a Database viewer program, I would look at the Database for the paragraph fields table. Then just export table from D7 as a CSV file.

In D8, fill out 1 node paragraph values, just so you get the table structure, and export table as CSV.

Then with excel (or Libre office Calc) copy and paste values from one CSV to another.

Import CSV to D8 Database.

Clear the cache to see changes.

  • Schema differs form 7 to 8 in paragraph module, I need a solution inside drupal itself – Mohammed Gomma Apr 29 '16 at 10:29
  • @Mhmdgomma figure out the differences and move the values to the appropriate columns. – No Sssweat Apr 29 '16 at 21:04
  • That solution has come to my mind, But I am looking for a generic solution to be reused in other projects – Mohammed Gomma Apr 30 '16 at 7:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.