Skip to content

Name failed imports after the item, not its file - #1205

Merged
KevinJump merged 1 commit into
v17/mainfrom
fix/failed-import-item-name
Nov 5, 2026
Merged

KevinJump merged 1 commit into
v17/mainfrom
fix/failed-import-item-name

Conversation

@KevinJump

Copy link
Copy Markdown
Owner

Fixes #1200

When an item threw during import, its failed result was named after its file ({guid}.config) and had no key or path, so it didn't line up with a successful import of the same item (seen in Publisher push results).

Change

In the catch in SyncHandlerRoot.ImportSingleElementAsync, the failure now uses:

  • node.GetAlias() as the name (falling back to the file name if blank)
  • the node's key and path
  • the site-relative file via GetNameFromFileOrNode

The log message still uses the file name.

Note: the issue suggested GetNameFromFileOrNode for the name, but that returns the file path; the name the other ReportAction calls use is the node alias.

Tests

New FailedImportNameTests: exports a page, deletes its doctype, re-imports and checks the failure's name, key and file. It fails without the fix (home.config, empty key). Full suite: 233 passed.

v18 probably has the same code; check when forward-porting.

🤖 Generated with Claude Code

When an import threw, the failed result was named after the file
(e.g. {guid}.config) and had no key or path. It now uses the node's
alias as the name and carries its key, path and site-relative file,
matching the success path.

Fixes #1200

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/17.6.2 uSync 17.6.2 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed imports are listed by file name, not item name, in the results

1 participant