{"record":{"id":"c4ab508deed096cf","repo":"ramensoftware/windhawk","slug":"the-mod-source-cause-so-its-settings-were-not-exported-this","errorCode":null,"errorMessage":"the mod source {cause}, so its settings were not exported; this offline archive references the mod instead of embedding it","messagePattern":"the mod source (.+?), so its settings were not exported; this offline archive references the mod instead of embedding it","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/windhawk-core/core/src/services/user_data.rs","lineNumber":229,"sourceCode":"            SourceRead::Text(text) => source_text = Some(text),\n            SourceRead::Unusable(cause) => {\n                if is_local {\n                    warnings.push(warn(\n                        id,\n                        format!(\"the mod's source {cause}, so it was not exported\"),\n                    ));\n                    return Ok(None);\n                }\n                // A repository mod with no usable source (a broken install):\n                // export it reference-only, without settings.\n                let mut message =\n                    format!(\"the mod source {cause}, so its settings were not exported\");\n                if offline {\n                    message.push_str(\n                        \"; this offline archive references the mod instead of embedding it\",\n                    );\n                }\n                warnings.push(warn(id, message));\n            }\n        }\n    }\n\n    let settings = if want_settings {\n        canonical_settings(session, language, id, source_text.as_deref(), warnings)?\n    } else {\n        None\n    };\n\n    // An all-default config carries no information (import resets a processed\n    // mod's user-owned config to those same defaults), so it is dropped to keep\n    // the archive lean.\n    let config = if want_config {\n        entry\n            .config\n            .as_ref()\n            .map(project_user_owned_config)","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/ramensoftware/windhawk/blob/61d99ed8e182e1af1b60109612b6763ad1b4b74e/src/windhawk-core/core/src/services/user_data.rs#L211-L247","documentation":"For a REPOSITORY mod whose source cannot be read while its settings were requested, export emits 'the mod source <cause>, so its settings were not exported' — the mod is still exported as a reference (no settings), and in offline mode an extra clause notes the archive references rather than embeds it.","triggerScenarios":"Running `data export` (especially `--offline`) with a repository mod selected whose installed source copy is missing/corrupt: settings canonicalization requires the source, so settings are dropped but the mod id/version reference is kept.","commonSituations":"Broken mod installs where the stored source vanished; offline exports on machines where the mod was never fully downloaded; re-exporting backups after cleanup tools removed mod files.","solutions":["Reinstall the mod so its source is present, then re-export","Import the resulting archive (the mod will be fetched from the repository by reference)","Drop the settings selection for that mod if settings aren't needed","Avoid --offline if online export can fetch the source from the repository"],"exampleFix":"null","handlingStrategy":"fallback","validationCode":"// before export: confirm repository mod source copies are readable if settings are selected\nif want_settings {\n    if read_source(id).is_unusable() { eprintln!(\"{id}: settings will be dropped\"); }\n}","typeGuard":null,"tryCatchPattern":"let res = export(...);\nfor w in &res.summary.warnings {\n    if w.message.contains(\"settings were not exported\") {\n        eprintln!(\"reinstall {} to keep its settings in the archive\", w.mod_id);\n    }\n}","preventionTips":["Reinstall broken repository mods before exporting their settings","Skip --offline when the source must be fetched from the repository","Review warnings: referenced-only mods lose their settings in the archive"],"tags":["export","user-data","repository-mods","offline"],"backgroundTag":"file-read-failed","analyzedSha":"61d99ed8e182e1af1b60109612b6763ad1b4b74e","analyzedAt":"2026-09-12T14:02:41.115Z","contentChangedAt":"2026-09-12T14:02:41.115Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}