Classification creation fails with: Missing classification
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2011 07:16 PM
I'm trying to create my own classification via the WebScript but it fails with the error message: Missing classification: {travel.agency.model}taclassifiable
I have defined my own model (<namespace uri="travel.agency.model" prefix="ta"/>) in which there is this aspect defined:
I have defined my own model (<namespace uri="travel.agency.model" prefix="ta"/>) in which there is this aspect defined:
<aspect name="ta:taclassifiable"> <title>Travel Agency Classifiable</title> <parent>cm:classifiable</parent> <properties> <property name="ta:categories"> <title>Categories</title> <type>d:category</type> <mandatory>false</mandatory> <multiple>true</multiple> <index enabled="true"> <atomic>true</atomic> <stored>true</stored> <tokenised>false</tokenised> </index> </property> </properties> </aspect>
When I try to execute this code, it generates above mentioned error:var categoryRoot = roothome.childByNamePath("categories");var props = [];props["view:childName"] = "{travel.agency.model}taclassifiable";var classification = categoryRoot.createNode("taclassifiable", "cm:category", props, "cm:categories");
Am I missing something?
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2011 04:40 PM
Found the solution, I replaced last line of the code and removed 'view:childName' property:
var categoryRoot = roothome.childByNamePath("categories");var props = [];var classification = categoryRoot.createNode("{travel.agency.model}taclassifiable", "cm:category", props, "cm:categories", "{travel.agency.model}taclassifiable");
This line also works:var classification = categoryRoot.createNode("taclassifiable", "cm:category", props, "cm:categories", "ta:taclassifiable");
