My Oracle Support Banner

Tag asset:filterassetsbydate Tag Excludes Assets With Today As Start Date Due to The Use of Milliseconds (Doc ID 2004428.1)

Last updated on JULY 07, 2017

Applies to:

Oracle WebCenter Sites - Version 11.1.1.8.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.1.1.8.0 version, WebCenter Sites

When attempting to use <asset:filterassetsbydate> tag and only date is passed (without time), the following error occurs.

ERROR
-----------------------
The tag adds the timestamp as 00:00:00.000 and then attempts to filter assets. This filters out assets that have the same date but non-null timestamp.

 

Sample Test Case
-----------------------
1. In avisports site, create an AVIImage asset with id 1377549321360 , set the startdate to 2015-03-23 00:00:00, and set enddate to 2015-03-30 00:00:00 and save.

2. Check the AVIImage table, and see the startdate value for the asset is 2015-03-23 00:00:00.636.

3. Implement a CSElement named "testAssetFiltering" with the following logic: (assettype and assetid are hardcoded for testing purposes)

<listobject:create name="inputListName" columns="assetid,assettype" />
<listobject:addrow name="inputListName">
    <listobject:argument name="assetid" value="1377549321360" />
    <listobject:argument name="assettype" value="AVIImage" />
</listobject:addrow>
<listobject:tolist name="inputListName" listvarname="assetInputList" />
<asset:filterassetsbydate inputList="assetInputList" outputList="assetOutputList" date="2015-03-23" />

<ics:listloop listname="assetOutputList">
        <ics:listget listname="assetOutputList" fieldname="assetid" output="id"/>
        ID: <ics:getvar name="id"/><br/>
</ics:listloop>


4. Create a SiteEntry named "testAssetFiltering" for the CSElement created in step 3.

5. Hit the testAssetFiltering page - http://hostname:port/cs/ContentServer?d=&pagename=testAssetFiltering - and do not see AVIImage:1377549321360 returned.

Changes

In futuretense.ini: cs.sitepreview=contentmanagement

This allows the tag to filter assets based on the input date parameter value.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.