The relation "source object" is only available to the first template of non-custom types

WHAT IS THE BUG

When creating templates for custom types in the library, those templated do not contain the special relation called “source object”. This is only available to A) Anytype types and B) only to the first template aka the default one when installing a type from marketplace.

To my understanding, this relation is used for objects that are created with that specific template to later identify / categorize which object was created through which template. I assume this is needed for other features like applying changes from a template to objects of that kind. That said, I’m not sure why this relation only works for types you install from the marketplace and have a default template.

HOW TO REPRODUCE IT

  1. Check that the first template of Anytype type (e.g Book, Movie, …) contains the relation “source object”
  2. Create another template or create a custom type and then a new template
  3. See that the new template does not have the relation “source object”
  4. I was able to provide you a screenshot of the bug, here it is:

Screenshot 2023-02-23 at 17.17.25

THE EXPECTED BEHAVIOR

I think all templates should have that relation.

SYSTEM INFORMATION

  • OS:
    MacOS Ventura 13.2.1
  • Device:
    MacBook Pro M1
  • Anytype Version:
    0.31.0

ADDITIONAL CONTEXT

Maybe @Product_Team / @DesktopTeam can tell, if this is wanted or unwanted behaviour. :face_with_monocle:

1 Like

It is a really shady bug we also spotted it already. Will be fixed in next release.

2 Likes

Great, thanks for confirming!

1 Like

I can still reproduce in 0.31.36-beta. Other than for the pre-installed templates, there is no relation “Source object”.

Update: Nothing changed so far. But i would also like to report that i can add the relation “Source Object” to any object or template but i can’t delete the relation although its value is empty. So basically there is no way going back once you added it. :grimacing:

I was a bit more complicated then we expected. We will fix it as a part of upcoming template updates after release :pray:

1 Like

Problem is fixed in version: 0.35.25-beta :white_check_mark:


However, there is still another problem related to “Source object” relation. When creating a new object and then switching the type from my default type to another type that has templates as well, the “Source object” relation still incorrectly links to the template of my default type.

This relations seems overall messy and the current plan is to make it hidden in next release.

3 Likes