Import error: file_type: undefined

Created on 10 May 2024, 7 months ago

Problem/Motivation

Import of exported contents file fails with error:

The referenced entity (file_type: undefined) does not exist.

Steps to reproduce

I suspect the issue involved another 3rd party module: https://www.drupal.org/project/file_entity

Install the noted 3rd party module.
Export any content to xml export file
Import same file on same (or any other install, with noted file_enity module installed)
Import fails

🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

🇦🇺Australia proxiblue

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @proxiblue
  • 🇦🇺Australia proxiblue

    Import via pasted xml continues to work, so looks like issue is 100% file upload / import, likely due to file entity changed.

  • Assigned to nginex
  • Status changed to Closed: works as designed 5 months ago
  • 🇺🇦Ukraine nginex

    Please add application/zip to mime types of document at /admin/structure/file-types/manage/document/edit

    This should solve the issue

  • Status changed to Active 5 months ago
  • 🇺🇦Ukraine nginex

    going to implement a hook_update_N to update this setting if file_enity module is enabled

    also I can add a warning message on content import page

  • 🇷🇴Romania oana.hulpoi

    Indeed, adding the MIME type here /admin/structure/file-types/manage/document/edit fixed the issue.
    Thank you!

  • 🇮🇳India dev2.addweb

    Hi,
    I have created patch and added hook_update_N as per suggested in #5, With addition of application/zip, I have to also added application/octet-stream for YAML file. Please review patch.

  • Status changed to RTBC about 1 month ago
  • 🇮🇳India rajeevgole

    I have reviewed the patch(#7) manually. It works fine.

Production build 0.71.5 2024