Skip to main content

Importers

The [MC] Downloads Manager: Importers add-on (MC/DMImporters) plugs into XenForo's built-in import system and migrates existing download/file libraries into Downloads Manager. Each importer is registered as a standard XF importer, so the workflow is the same as any core XF import.

Requirements

  • XenForo 2.3.1 or newer.
  • [MC] Downloads Manager 1.0.4 or newer (installed and enabled).
  • The MC/DMImporters add-on installed and enabled.
  • Per-importer requirements — see the individual pages.

Available importers

ImporterSourceNotes
XenForo Resource ManagerXFRM 2.3+ on the same XF installSame-DB import. Reuses existing user IDs, prefixes, fields, tags, content votes.
Invision Community 4 (Downloads)IC4 Downloads on an external DBExternal DB connection. Requires a prior XF Invision Community 4.x forum import — user, topic, and attachment IDs are resolved through its log.
Invision Community 5 (Files)IC5 Downloads/Files on an external DBHidden from the public release. Code is kept in the source tree and remains usable on dev installs that define MC_DMI_INCLUDE_IC5; not selectable from AdminCP otherwise.

Running an import

  1. Install and enable [MC] Downloads Manager: Importers.
  2. Navigate to AdminCP → Tools → Import data.
  3. Pick the importer whose Target is "Downloads Manager".
  4. Fill in the base configuration (source connection, paths) and validate.
  5. On the step-configuration screen, decide for each top-level concept (categories, prefix groups, prefixes, custom fields) whether to map an existing Downloads Manager record, create a new one, or skip it.
  6. Choose which optional content to bring across (non-visible downloads, reviews, watchers/follows, etc.).
  7. Run the import. Steps execute in dependency order, and progress is resumable.

Tip — test on a copy first. Importers write directly into Downloads Manager tables. Always run a dry pass against a staging/sandbox database before touching production. The importer is idempotent at the row level (re-imports are mapped through the import log), but option choices made on the configuration screen are not retroactively reversible.

What gets imported

The exact step list depends on the source platform, but every importer covers, at minimum:

  • Categories — preserving the tree structure.
  • Custom fields — including choices, match rules, display group/order.
  • Downloads (resources/files) — including state, author, counters, description.
  • Versions — sorted by release date so the newest is shown first.
  • Files (binaries) — copied through the source filesystem, hashed, and stored under DM's PathScheme layout.
  • Icons / screenshots — re-processed through Service\Download\Icon to generate DM's variants.
  • Custom field values, reviews, watchers/follows, attachments in descriptions, tags.

Source-specific concepts that have no equivalent in Downloads Manager (e.g. IC5 has no prefix groups) are simply skipped — they will not appear in the step list.

Mapping vs. creating

For every category, prefix group, prefix, and custom field discovered in the source, the import-configuration screen offers three choices:

  • Map to existing — point the source ID at an existing Downloads Manager record. Subsequent rows that reference the source ID are remapped through this choice.
  • Create new — let the importer create a fresh Downloads Manager record from the source data. The new ID is recorded in the import log.
  • Skip — neither map nor create. Any child rows referencing this ID will be skipped too.

Choices are scoped per import session and stored in step_config. You can re-run a session and only its still-unfinished steps will execute.

Re-running and rollback

  • The framework's import log (xf_import_log_<session>) records every (content_type, old_id) → new_id mapping. If a step is interrupted, restarting the session continues from state.startAfter rather than reprocessing.
  • Full rollback is not provided by the importer add-on. To roll back, drop and reinstall Downloads Manager (or restore from backup) before starting again.

Troubleshooting

  • "XFRM is not installed" — XFRM must be both installed and active. The importer checks addOnManager()->getById('XFRM').
  • "Directory … not found / not readable" (IC5) — the path you entered for the IC5 uploads/ directory is not readable by the PHP user running XF.
  • "Forum import log cannot be found" (IC5) — the table name you entered for the IC5 forum-import log does not exist on this XF DB. Leave blank if you have not previously run an IC5 forum import.
  • Files step logs source missing — the source attachment/file row exists in the source DB but the underlying binary is gone from disk. The row is skipped and logged; the rest of the import continues.
  • Counters look wrong post-import — category counters are rebuilt at the end of the categories step, but the standard XF Permission rebuild and Search rebuild jobs should still be queued from AdminCP → Tools → Rebuild caches after large imports.