Skip to content

fix(dav): handle import components without a UID - #66489

Open
lazerg wants to merge 1 commit into
nextcloud:masterfrom
lazerg:fix/issue-66486-import-uid-less
Open

lazerg wants to merge 1 commit into
nextcloud:masterfrom
lazerg:fix/issue-66486-import-uid-less

Conversation

@lazerg

@lazerg lazerg commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The import TextImporter stores components that have a UID as a list of instances, but a component without a UID was stored as a single bare instance. ImportService always reads $instances[0] and passes its offsets to extract(), so the first card or event without a UID threw a TypeError and aborted the whole import. This wraps the UID-less entry in a list in the CardDAV and CalDAV text importers and in the xCal importer, which had the same pattern. Such objects now reach the existing "without a UID" handling in importProcess() like any other object, so they are reported per item instead of aborting the import. They are still not imported, since that would need a generated UID and I left that call to you. I added tests for vcf, ical and xcal input.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: lazerg <lazerg2@gmail.com>
@joshtrichards joshtrichards added bug 3. to review Waiting for reviews feature: carddav Related to CardDAV internals labels Nov 9, 2026
@SebastianKrupinski
SebastianKrupinski force-pushed the fix/issue-66486-import-uid-less branch from 702b669 to d352924 Compare November 10, 2026 19:56
@SebastianKrupinski

Copy link
Copy Markdown
Contributor

Hi @lazerg

Thank you for the PR. But this is not the correct solution for the issue.

@lazerg

lazerg commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for looking. Which approach do you prefer: generating a UID for these components on import, or something else?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug feature: carddav Related to CardDAV internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants