Oracle WebCenter Sites BlobServer Content Type & Content-Disposition Response Header Issues

Usually we can control what happens when a user clicks on a blobserver URL , i.e if user wants the blob to be opened inline in the browser (Ex: PDF) , we can provide the additional arguments with render:getbloburl tag which allows user to set the response headers that blob server will send with blob , such as Content –Type and and Content-Disposition to control how the browser handles the blob.

Example :

<render:getbloburl
<!– provide other params like blobtable, blobkey, etc… –>
<render:argument name=”blobheadername1″ value=’Content-Type’ />
<render:argument name=”blobheadervalue1″ value=’application/pdf’ /> 
<render:argument name=”blobheadername2″ value=’Content-Disposition’ />
<render:argument name=”blobheadervalue2″ value=’attachment; filename=MyFile.pdf’ />
</render:getbloburl>

Additional Notes : With IE 7 & IE 8 , you might encounter “The requested site is either unavailable or cannot be found. Please try again later.” errors which can be avoided using additional Cache-Control header information as given below

  <render:argument name=”blobheadername1″ value=”Cache-Control”/>

  <render:argument name=”blobheadervalue1″ value=”private”/>

render:getbloburl without Content-Type or Content-Disposition

There might be cases where no additional information related Content Type or Content –Disposition was provided . So how WebCenter Sites handles in this case?

With WebCenter Sites – 11.1.1.6 and later when making a request to BlobServer without ContentType and Content Disposition , Content-Disposition by default gets set to attachment; filename=”{filename}”;filename*=UTF-8””{filename}””.

This causes the browser to prompt the user to download the blob instead of opening the blob in browser.

Earlier version of WebCenter Sites (Fatwire) treats these cases differently. So with WebCenter Sits 11.1.1.6 or later you might encounter certain issues like Flash Player not working (Flash movies not playing which were playing in Fatwire without any issues ) etc..

So to resolve these issues while building the blob URL provide the additional header values as arguments by overriding the default Content-Disposition and clear the cache to make it work.

<render:argument name=”blobheadername1″ value=”Content-Disposition”/>
  < render:argument name=”blobheadervalue1″ value=”inline”/>

Advertisements

Oracle WebCenter Sites Mirror Site Configuration issues : Error publishing Start Menu items

With Oracle WebCenter Sites , when you tried to Mirror Site Configurations from source to destination systems , you may face exceptions as given below 

Error publishing Start Menu items, -12044, [pagename=OpenMarket/Xcelerate/Admin/MirrorSitePost] Error: com.openmarket.xcelerate.commands.StartMenuDispatcher: Publish: com.openmarket.basic.interfaces.AssetException: Remote object save didn’t fire [error was -611]

You can find additional errors in both source futuretense.txt and target futuretense.txt

Theses exception could be similar to as given below

Exception on Source

 <!–FTCS|||result=failure|||reason=Failed to commit changes to catalog StartMenu|||err=-611|||command=committables|||params=|||–>

Exception on Target

[2014-02-10 16:05:09,308 EST] [ERROR] [.kernel.Default (self-tuning)’] [fatwire.logging.cs.db] SQLException executing query: insert into StartMenu (id,cs_name,cs_description,cs_assettype,cs_processform,cs_partform,cs_saform,cs_itemtype,cs_assetsubtype,fw_uid) select id,cs_name,cs_description,cs_assettype,cs_processform,cs_partform,cs_saform,cs_itemtype,cs_assetsubtype,fw_uid from tt1320480615775

java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (CSDBUSER1105.I1150985659977) violated

Possible Root Cause for Mirror Site Configuration Issue

When items are being mirrored with Mirror Site Configuration, they are deleted and recreated on the target tables, using the ID column as the key for deletion. If a record exists on target with the same name but different ID as one being published, then it will not be deleted on target, and when the one being mirrored tries to save, there is an error on target because of a unique constraint on the name.

How to resolve Mirror Site Configuration Issue

Try enabling the debug mode log levels on the source system then you can find additional information as given below in the source futuretense.txt . Try to find the relevant logs related the failed exception i.e according to the exception on the source

<!–FTCS|||result=failure|||reason=Failed to commit changes to catalog StartMenu|||err=-611|||command=committables|||params=|||–>

Failed table name is StartMenu, so look for debug information related to StartMenu items. Similarly if you observe exceotions related to CSElement look for CSElement related debug information and in the next step you would be looking for an entry in CSElement table instead of StartMenu table

Object Name: StartMenu

MirrorQueueEntry:

        keyName:id

        keyType:(integer)

        ->rows to be added/updated:

        Key=1159296432909 version=null

        Key=1159296432981 version=null

        Key=1159296432977 version=null

        ->rows to be deleted:

 

  1. Copy all these Key’s to a notepad
  2. Using Sites-Explorer, check in Start Menu table on the source for the ids noted above. (Not all ids will be present)
  3. Get the name of the asset corresponding to ID on the source system
  4.  Using Sites-Explorer, find the records in the on the target with the same name as on the source but with different ids.(Note down the assets which have same name in both target and source system but with different ID)
    • Use the Admin UI to remove or rename the items identified in step 4, or use Sites-Explorer to rename them. Don’t delete the records using Sites-Explorer as this may leave behind some orphan records in other tables.
  5.  Run Mirror Site Configuration again.
  6. Example : In the above debug message , get the key 1159296432981
    • Search in the source systems Start Menu table for the record 1159296432981
    • Assume if the name of the Start Menu is “Find Template”
    • Go to the Target system and search for “Find Template” Start Menu item
    • If the id of the Start Menu on target is different from source and Delete this “Find Template” Start Menu from Admin UI
    • If the ID is same or if the name of the Start Menu is not available, ignore the Start Menu
    • Similarly do these steps fro all the different keys

Asset Cache Not Updated on Other Cluster Members after Asset is updated on primary cluster member

With WebCenter Sites 11.1.1.6.0 or later , after updating an asset on a primary cluster member , Asset Cache on other cluster member takes a while to update

Below are the two  possible causes of this issues

1.Incorrect Mutilcast setting 

  • Ensure that for each cluster member, the cs-cache.xml and linked-cache.xml has the same multicastGroupAddress and multicastGroupPort.
  • Make sure that the timeToLive is set appropriately. If the timeToLive is set to 0, but the cluster members are on different machines, the multicast messages will not reach the other cluster members.
  • The following are the valid settings for timeToLive

0 – same host
1 – same subnet
32 – same site
64 – same region
128 – same continent
255 – unrestricted

2.Check if all WebCenter Sites cluster members have synchronized system times

Asset Cache Not Refreshed on Target When A Basic Asset Is Published Using Mirror Publish

With WebCenter Sites 11.1.1.6.0 or later , it is observed that basic assets cache will not get cleared on the target server when published using Mirror Publishing method.
 
However it works correcly for flex assets and works perfectly fine for basic assets with RealTime Publishing.
 
There are couple of work arounds suggested by Oracle , please refer to 
Oracle Support document “1582522.1”  for more information
 
1. Use RealTime Publishing instead of Mirror Publishing
 
2. Add a custom code to Mirror publish on the target , to the flush the assets
 

WebCenter Sites 11g : Edit Content assets in Admin UI

With WebCenter Sites 11g all the content creation /upgrade activities can be efficiently performed from a new Contributor Interface . However there would be cases where these basic content management activities needs to be performed from Admin interface.

By default Admin interface doesn’t let the user to edit assets.However you can set the property advancedUI.enableAssetForms in the futuretense_xcel.ini property file to true , so that authorized users can directly edit the assets from Admin interface.

The Property Files Reference describes this property as follows:

Used to enable and disable the WebCenter Sites Admin interface for content contributors. Access to the following assets is affected:
• All flex assets and their parent assets
• All basic assets
• Engage assets, such as recommendations, segments and promotions
• Query, Collection, and Page assets

By default, this property is set to false, which disables the WebCenter Sites Admin interface for content contributors. The assets listed above cannot be created, edited, searched for, or deleted, except from the WebCenter Sites Contributor interface, where they are supported by default.

Note: In the Contributor interface, asset types and assets intended for developers are either available only for inspection or they are inaccessible. They must be accessed from the WebCenter Sites Admin interface. For a comparison of features in the Contributor and Admin interfaces, see the WebCenter Sites User’s Guide.

Default value: false

 Image

Screen shot showing the additional tool bar options after resetting the property to true.

Oracle WebCenter Sites Upgrade/Fatwire Upgrade : High Level upgrade actvities

Below are the some of the high level activities to be considered while upgrading from Fatwire 7.X to WebCenter Sites 11g. This list can be considered as high level check list for Pre & Post upgrade.

Pre Upgrade Activities

  1. Make sure there are no open DB connections
  2. Disable all publishing schedules and ensure that no publishing sessions are running
  3. For JDK 1.6, copy the jaxb-impl-2.1.12.jar
  4. Update Classpath with MSXML.jar : Missing with our scripts
  5. Update start-up scripts with XX:MaxPermSize and -Dcs.useJavaURLDecoder to false and other JVM settings
  6. Update LD_LIBRARY_PATH with CS-INSTALL\bin directory
  7. Ensure that all external data feeds and events are disabled
  8. Disable Revision Tracking for the assettypes
  9. Add the path to WebCenter Sites’ modified version of the Microsoft XML Parser (MSXML.jar in the WEB-INF/lib directory).
  • If the class path refers to another version of the Microsoft XML Parser, WebCenter Sites will fail when parsing XML.

Post Upgrade Activities

  1. Copy Property Files
  2. Create custom/shared folders
  3. Copy Image & JS Folders
  4. Apply customizations
  5. After the upgrade, attribute forms will display additional fields which are not seen on a fresh installation. To make the attribute forms consistent with those of a fresh installation, you will edit the gator.ini file by setting the mwb.externalattributes property to false
  6. Create the start menus for PageAttribute, PageDefinition, and PageFilter so these asset types can be used.
  7. Re-Register the basic asset types
  8. Re apply any customizations on basic assets
  9. Enable Revision Tracking
  10. To enable publishing of site plan assets to the delivery system, initialize the RealTime destination. Initialization
  11. Create the SitePlan asset type on delivery
  12. Enable the publishing schedules
  13. Run Upgrade Utility . Publishing of approved assets will not function correctly until the upgrade utility is run
  14. Publish assets
  15. Rerun Search Indices
  16. Enable any events
  17. Clear Client Browser caches
  18. Verify