首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >文件迁移创建鬼文件

文件迁移创建鬼文件
EN

Drupal用户
提问于 2018-09-03 15:05:20
回答 1查看 175关注 0票数 0

我在本地安装(2个不同的多站点)上测试了从Drupal 6到Drupal 8的迁移。有时候我在运行upgrade_d6_file之后会得到“幽灵文件”。

已处理的1444个项目(1441年创建,0更新,3个失败,0忽略)-与' upgrade_d6_file‘ upgrade_d6_file迁移-3失败。

然后在管理/内容/文件中,我得到像或wruhahachicregiwaspidristocospopowrucrekefrocojegephehoshapracocrewafrispugedrachupuclushipreclochoshusiclastewracrislumufraswiheracribra.这样的文件

我怎样才能解决这个问题?

EDIT1:在我的用例中,使用自定义节点内容migration.Not,肯定会使用Skipon空选项。但是文件存在,则创建鬼文件。

代码语言:javascript
复制
id: upgrade_d6_node_diapo_hp
label: Nodes
audit: true
migration_tags:
  - Drupal 6
  - Content
  - Migration_CE
migration_group: migrate_drupal_6_ce
source:
  plugin: d6_node
  node_type: diapo_hp
process:
  # In D6, nodes always have a tnid, but it's zero for untranslated nodes.
  # We normalize it to equal the nid in that case.
  # @see \Drupal\node\Plugin\migrate\source\d6\Node::prepareRow().
  # If you are using this file to build a custom migration consider removing
  # the nid and vid fields to allow incremental migrations.
  nid: tnid
  vid: vid
  langcode:
    plugin: default_value
    source: language
    default_value: "und"
  title: title
  uid: node_uid
  status: status
  created: created
  changed: changed
  promote: promote
  sticky: sticky
  body/format:
    plugin: migration_lookup
    migration: d6_filter_format
    source: format
  body/value: body
  body/summary: teaser
  revision_uid: revision_uid
  revision_log: log
  revision_timestamp: timestamp

  #OK        
  field_diapo_home:
    plugin: d6_field_file
    source: field_diapo_home
    process:
      target_id:
        plugin: migration_lookup
        migration: upgrade_d6_file
        source: fid
        -
        plugin: skip_on_empty
        method: process



#  unmapped d6 fields.
#  tnid
#  translate
#  moderate
#  comment

destination:
  plugin: entity:node
migration_dependencies:
  required:
    - upgrade_d6_user
    - upgrade_d6_node_type
    - upgrade_d6_node_settings
    - upgrade_d6_filter_format
  optional:
    - fields_instance_widget
    - fields_formatter_settings  
EN

回答 1

Drupal用户

回答已采纳

发布于 2018-09-11 06:38:40

试着这样做:

代码语言:javascript
复制
  field_diapo_home:
  -
    plugin: d6_field_file
    source: field_diapo_home
    migration: upgrade_d6_file
  -
    plugin: skip_on_empty
    method: process
票数 1
EN
页面原文内容由Drupal提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://drupal.stackexchange.com/questions/268635

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档