Oracle WCS (Fatwire) · Technical

Fatwire | Common errors and their Prevention


  1. ics:listloop tag failure
  2. Invalid type specified: Page
  3. Need a ‘ID’ field & Need a ‘Type’ field
  4. ics:setvar missing or empty argument value
  5. Error: no object named <ObjectName>
  6. Error -101 in tag ics:selectto with table Template_Composition

1. Error: ics:listloop tag failure

Root Cause: This error occur if asset type [c] and/or asset Id [cid] passed to tag <assetset:setasset/> or <asset:load/> is NULL.

<ics:listloop listname=”myList”>

</ics:listloop>

Solution: Always apply null check before iterating a list.

<ics:if condition='<%=null != ics.GetList(“myList”) && ics.GetList( “myList” ).hasData() %>’>
<ics:then>

<ics:listloop listname=myList”>

</ics:listloop>

</ics:then>
</ics:if>

2. Error: Invalid type specified: Page

Root Cause: This error occurred, If type passed to <assetset:setasset /> tag is a basic asset eg. Page. As Page asset is basic type asset. And this tag is meant to load Flex Asset.
This code will give “Invalid type specified: Page” error:

<ics:setvar name=”c” value=”Page“/>
<ics:setvar name=”cid” value=”123456789″/>
<assetset:setasset name=”asset” type='<%=ics.GetVar(“c”)%>’ id='<%=ics.GetVar(“cid”)%>’ />

Solution: Check asset type and use <asset:load> tag for basic assets.

<ics:setvar name=”c” value=”Page“/>
<ics:setvar name=”cid” value=”123456789″/>

<ics:if condition='<%=“Page”.equals(ics.GetVar(“c”)) %>’>
<ics:then>

<asset:load name=”AsscAsset” type='<%=ics.GetVar(“c”)%>’ objectid='<%=ics.GetVar(“cid”)%>’/>

</ics:then>
<ics:else>

<assetset:setasset name=”AsscAsset” type='<%=ics.GetVar(“c”)%>’ id='<%=ics.GetVar(“cid”)%>’ />

</ics:else>
</ics:if>

3. Error: Need a ‘ID’ field & Need a ‘Type’ field

Root Cause: This error occur if we try to iterate through an uninitialized list.
Solution: We should put NULL check on c and/or cid in such a situation where there is possibility for NULL value.

<ics:if condition='<%=ics.GetVar(“c”) != null && ics.GetVar(“cid”) != null %>’>
<ics:then>

<assetset:setasset name=”myAsset” type='<%=ics.GetVar(“c”)%>’ id='<%=ics.GetVar(“cid”)%>’/>

</ics:then>
</ics:if>

4. Error: ics:setvar missing or empty argument value

Root Cause: This error occur if we try to set null as value in <ics:setvar /> tag.
Solution: Set some Default value for variable at the top of the page or Write code in a manner so that no chance to NullPointer, NumberFormat … exception.

5. Error: no object named <ObjectName>

Root Cause: This error occurred when asset loaded is NULL and we are trying to get data from the object.

<asset:load name=”TestObject” type='<%=ics.GetVar(“c”) %>’ objectid='<%=ics.GetVar(“cid”) %>’ />
<asset:get name=”TestObject” field=”id” output=”asset:cid”/>

Solution: Put NULL check on object before getting data out of it.

<asset:load name=”TestObject” type='<%=ics.GetVar(“c”)%>’ objectid='<%=ics.GetVar(“cid”) %>’ />
<ics:if condition='<%=ics.GetObj(“TestObject”) != null %>’>
<ics:then>

<asset:get name=”TestObject” field=”id” output=”asset:cid”/>

</ics:then>
</ics:if>

6. Error: Error -101 in tag ics:selectto with table Template_Composition

Root Cause: If there is no record found for SQL for tag <ics:selectto/>, then it returns (-101) Error code.
Solution: I will suggest to use SQL query (using <ics:sql /> tag) instead of <ics:selectto/>. Also Its always good to use SQL query (with join in 3-4 tables) instead of <asset:load> tags … Its a trade off and you are the best person to decide which one to use.

Advertisements

One thought on “Fatwire | Common errors and their Prevention

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s