Content Server Manual / Version 2110
Table Of Contents
There are two different cases when changing the LinkType
attribute of a
LinkListProperty
definition.
Choosing a supertype of the current LinkType
If the new LinkType
is a supertype of the current LinkType
, it's sufficient
to restart the Content Servers after changing the document type definition.
Choosing a subtype of the current LinkType or another unrelated type
If the new LinkType
is not a supertype of the current LinkType
, then links
in existing content may point to documents of wrong types. Before changing the content type definition,
check whether such content exists by using the command-line tool
cm validate-link-type
, which is described in Section 3.13.1.10, “Validate Link Type”
For example, if you want to change the LinkType
attribute for property pictures
of
type Teasable
from Media
to subtype Picture
, check if there's any link
that would violate the new LinkType
:
cm validate-link-type -u admin -t Teasable -l pictures -n Picture -a
The example uses the -a
option to also check old document versions. Because old versions can
easily be restored by editors, they should be valid as well.
If the tool does not find any invalid links for the new link type, change the LinkType
attribute
in the document type definition and restart the Content Servers.
If the tool finds existing content with links that would be invalid for the new link type, you have different options:
Decide to not change the LinkType.
Remove documents or document versions with invalid links from all servers. Consider using tools such as Section 3.13.2.3.2, “Clean Versions” or Section 3.13.3.3, “Destroy”.
If really necessary, it's possible to remove links from the
linklists
database table for all Content Servers after they have been stopped. See Section 4.3.1, “The Database Schema” for a description of the database table. Database changes must be done with extreme caution. If you delete rows from thelinklists
table, you must not forget to update the value of theLinkIndex
column for other affected rows. TheLinkIndex
column represents a link's position in a link list. Therefore, its value must be reduced for all links after you removed a link in the same property of the same document version.