corteza: Error trying to export namespace: module does not exist

Is there an existing issue for this?

  • I have searched the existing issues

Version of Corteza

2023.3.5

Current Behavior

When trying to export a namespace (Manage namespaces -> Pick from list -> Export namespace), I’m encountering the following response:

{
   "error":{
      "message":"invalid module reference {corteza::compose:module {[347533651178741763] map[347533651178741763:true]} {corteza::compose:namespace {[344241087105269762] map[344241087105269762:true]}} false}: module does not exist"
   }
}

344241087105269762 is a valid namespace ID - it’s the built-in CRM namespace that I modified over time. No module exists with the id of 347533651178741763, at least not now. I guess it was created and then deleted. However, when I go into modules list in this namespace and hit “Export”, the modules list exports without problem. Module with ID 347533651178741763 was not in that list.

Expected Behavior

Export tool should ignore non-existing modules during export or have some sort of clean-up after deleting module.

Steps To Reproduce

No response

Environment and versions

No response

Anything else?

When I created a blank test namespace with two modules and deleted one of them, the export succeeded, so that wasn’t the case here. There’s something wrong with this one particular namespace.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

2023.9.2-rc.1 finally works in my case. However, if I try to export namespace, delete it in Corteza and then import it again, it complains with error: Namespace failed to import: not unique. The problem exists even if I give it a different name when importing, change the id line in the exported yaml or even hard delete the namespace from database. There should be an option to force importing the namespace as new, with new IDs generated for namespace, modules, pages etc for test environments and such.