Problem/Motivation

Process plugin documentation is being moved from the Handbook to the API documentation of the process plugin class.

The handbook page for process plugin contains more information than the API documentation of the plugin.

Before we delete the handbook page and redirect it to the API page, we need to either enhance the API doc or decide that it is OK to discard the additional information currently found in the handbook.

The handbook documentation contains the following content that is currently not in the API documentation
Debugging tips
This plugin does not throw any errors if you put in an incorrect field name, it silently fails.

Migrating d6 node reference to d8
Scenario :
a) field_drupal6_pages is a drupal 6 node reference field.
b) field_drupal8_pages is a drupal 8 entity reference field.

process:
  field_drupal8_pages:
    plugin: migration_lookup
    migration: ya_node_page
    source: field_drupal6_pages

migrating d7 entity reference to d8
Scenario:
a) field_drupal7_pages is a drupal 7 entity reference field.
b) field_drupal8_pages is a drupal 8 entity reference field.

process:
  field_drupal8_pages:
    plugin: iterator
    source: field_drupal7_pages
    process:
      target_id:
        plugin: migration_lookup
        migration: ya_node_page
        source: target_id # Use 'nid' for node_reference or 'tid' for taxonomy_reference fields.

Other issues in the current API documentation
API documentation standards: use single quotes instead of double quotes
API documentation standards: there should not be a newline between a code example and the descriptive text
It is confusing which descriptive text belongs to which code example.

Proposed resolution

  • Do NOT include the D6-D8 nodereference or D7-D8 entityreference examples to the migration_lookup API documentation. The scope of the migration_lookup API documentation should be limited to explain how the process plugin works, it can't include all possible use cases how it is used. Therefore the node/entityreference examples belong more to the handbook rather than the API documentation.
  • Decide what to do with the current 'Debug tip: This plugin does not throw any errors if you put in an incorrect field name, it silently fails.'
  • Do the other improvements listed above.

Remaining tasks

See proposed resolution above.

User interface changes

N/A.

API changes

N/A.

Data model changes

N/A.

CommentFileSizeAuthor
#4 2933774-4.patch2.56 KBmasipila

Comments

masipila created an issue. See original summary.

masipila’s picture

Issue summary: View changes

Additional observations from the current API documentation review:

  • API documentation standards: use single quotes instead of double quotes
  • API documentation standards: there should not be a newline between a code example and the descriptive text
  • It is confusing which descriptive text belongs to which code example.

Issue summary updated.

masipila’s picture

Issue summary: View changes
StatusFileSize
new2.56 KB

1. Hmm. I'm wondering if we need to include the D6-D8 nodereference example or D7-D8 entityreference to the migration_lookup API documentation. The scope of the migration_lookup API documentation should be limited to explain how the process plugin works, it can't include all possible use cases how it is used. Therefore the node/entityreference examples belong more to the handbook rather than the API documentation.

2. What do the others think about the current 'Debug tip: This plugin does not throw any errors if you put in an incorrect field name, it silently fails.'?

3. The other improvements listed in #3 are included in the attached patch.

Issue summary updated accordingly.

Markus

masipila’s picture

Status: Active » Needs review
quietone’s picture

Status: Needs review » Reviewed & tested by the community

4.1 - Agree to keeping the nodereference and entityreference examples in the handbook. And also removing the example that is in the api docs that is duplicated in the handbook.

4.2 - Leave the debug tip in the handbook and open an issue to discuss adding error handling to the api process plugin documentation. I'm pretty sure the existing api docs don't include error handling (I checked a couple). This could be a meta with one issue per plugin, many of which could be novice, I think.

4.3 - Patch look good to me. RTBC.

Anyone else want to express their opinion on #4-2?

larowlan’s picture

Version: 8.4.x-dev » 8.5.x-dev

8.4.x will only receive critical backports now

  • Gábor Hojtsy committed 848e20e on 8.5.x
    Issue #2933774 by masipila, quietone: Merge handbook documentation to...
gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Looks good, thanks all!

heddn’s picture

Issue tags: +Migrate January 2017 Sprint
heddn’s picture

Issue tags: -Migrate January 2017 Sprint +Migrate January 2018 Sprint
quietone’s picture

Status: Fixed » Closed (fixed)

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