Skip to content

Imported OG templates with properties can't define new properties / inconsistent with DB template model #1184

Open
logseq/logseq
#13292

Description

@mschiff

Search first

  • I searched and no similar issues were found

What Happened?

When importing an OG graph into the DB version, templates that had properties on the template block itself are imported as blocks with the template tag, keeping those properties directly on the template block. The template is usable and its properties are correctly applied to new blocks when the template is used.

However, the DB version handles template properties differently: a template block only offers a static "Apply template to tags" property where you reference a tag, and that tag's properties are then applied to new blocks when the template is used.

As a result, imported templates behave differently from natively created ones, and there is no way to define new properties on imported templates (no way to set them up for the "Apply template to tags" mechanism). This is inconsistent and effectively broken.

Suggested fix: on import, create a new tag from the imported template's properties and set it as the "Apply template to tags" value on the imported template block.

Reproduce the Bug

  1. In the OG (file-based) version, create a template with properties on the template block (e.g. template:: my-template plus some properties).
  2. Import this graph into the DB version (tested with 2.0.1-alpha+nightly.20260908, Linux Desktop).
  3. Inspect the imported template: it is a block with the template tag and the original properties directly on it. Using the template still works and applies the properties to new blocks.
  4. Compare with a natively created template in the DB version: it has no editable properties, only the static "Apply template to tags" property.
  5. Try to define new properties on the imported template — there is no way to do so.

Expected Behavior

Imported templates should be converted to the DB template model: the template's properties should be turned into a (newly generated) tag, and that tag should be referenced via the template's "Apply template to tags" property, so imported templates behave like natively created ones and their properties can be managed consistently.

Screenshots

No response

Files

No response

Browser, Desktop or Mobile Platform Information

Version: 2.0.1-alpha+nightly.20260908
Platform: Linux Desktop

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Activity

  1. mschiff commented on Sep 16, 2026

    @mschiff
    Author

    I was confused. I just did not find any way to add more properties to nodes, that are not a tag. Today I realized that there is a keyboard shortcut for adding properties and this still works on imported templates. But there seems be no way of doing it without keyboard shortcut.

    However: I still find it confusing, that you can either have tenplates with properties and at the same time you can attach a tag to a template where more/other properties will come from.

    I think the difference is, that templated properties are node-local attached properties whereas properties coming from the tag will always be in sync with the tag properties and being updated if the tag will be changed in the future. But there is no visual distinction between these two "types" of properties.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions