Deleting a Variable Collection does not clean up Variables in that collection

closed
· Api ·
By SoulLink on 07/03/2026
· Assigned to synchr0nicity
· Minor Done

At least I am pretty sure that is the case. I've got tests setup with the public API and made a mistake, where I deleted collections before deleting variables in them. When I then recreate the same variable collection and variable, it fails for the variable as it says that there is duplicate key. So presumably there is still a variable with that key in the system, but I cannot actually retrieve that variable, because it is connected to a variable collection that no longer exists. The UI does not prevent me from deleting a collections that contain variables either, and leaves the same orphan variables behind.   I did all my testing in my API Client Test World: https://www.worldanvil.com/w/api-client-test-world-soullink   There should either be a system that prevents the deletion of a variable collection when it still contains variables, or a system where variable collection deletion also cleans up all the variables.   Or a way to see variables without collections.

Steps to Reproduce

  • Create a variable collection
  • Create a variable with a specific key
  • Delete variable collection
  • Recreate a variable collection
  • Try to recreate a variable with the same specific key.
  • Operating System

    Windows

    Browser

    Firefox

    Related Entity

    Variable Collection Deletion: https://www.worldanvil.com/w/api-client-test-world-soullink

    History

    Dimitris @ 03 Jul, 2026 11:15:49 Developer
    Dimitris Added tag Minor
    Dimitris @ 03 Jul, 2026 11:17:28 Developer
    Assigned synchr0nicity
    synchr0nicity @ 06 Jul, 2026 11:48:27 Assignee

    Hey there SoulLink, this is fixed, but please note for now that any variables that are orphaned will remain so, so you'll need to use different keys for the creation of new variables.

    synchr0nicity @ 06 Jul, 2026 11:48:43 Assignee
    synchr0nicity Added tag Done
    synchr0nicity @ 06 Jul, 2026 11:48:52 Assignee
    set this bug to closed