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

How to Renew Indian passport in USA!

I had recently got my Indian passport renewed at New York consulate. I had submitted the documents in person and process is really simple. Sharing my experience so that someone could find it useful.

I had submitted documents on 7-Jan-2014 and collected new passport on 27-Jan-2014.

Starting August 2013 , all the Indian passport/visa related services have been outsourced to BLS International Services Ltd.

So most of the useful information can be found at http://www.passport.blsindia-usa.com/passport_information.php  &  http://www.passport.blsindia-usa.com/reissue10.php  and you can also refer to http://www.indiacgny.org/ for more information.

Quick Tips while renewing Indian passport:

  • The time for the processing is typically 1-3 weeks and one of my friends got it renewed in a week in Houston, whereas mine took 3 weeks at NY consulate. Typical processing time can be found at http://www.passport.blsindia-usa.com/reissue10.php#time . However I would suggest don’t plan your travel according to the processing times mentioned in the site. Allow at least 3-4 weeks of time to make any travel plans.
  • Just have some additional buffer time , because one my friend’s new passport has some wrong entry which he eventually got it corrected but it took another week time. So have buffer time for your travel plan and make sure your new passport has correct information.
  • If you are planning to apply in person you need to have proper appointment to submit the documents. So I would suggest you first fill in the BLS Order Form , which is BLS office usage application with all your personal details and at the end of the application you will have to choose the appointment date.
  • So for some consulates this appointment dates wouldn’t be available for 2-3 weeks . So better complete this registration step first, get the appointment and then work on the rest of the documents. You have to complete this form irrespective of whether you are submitting by mail or in person. However just to save some time , complete this step first .
  • If you think you have a valid reason to get a tatkal service(Close relattives demise, emergencey reason to go to India etc…) , you can always give a try . I saw someone convincing the officer, though they don’t have an emergency reason for Tatkal. And even with Tatkal service it takes 2-3 days of time for processing.
  • Think these offices as just a small customer care office hardly with 3-4 desks , so don’t think too much about what if I get late or what to carry or what not to carry and just think these offices like simple store , where you are submitting applications .But better be prepared and not carry any valuable items so just in case if you have to leave your backpack at the security.
  • If there are any errors in your application, you can correct it at the office  and you can request them to use one of their public computer to take a print out or you have some mobile notary operators nearby. So don’t get panic when you will be asked to change something, request them you will go and get it fixed. Same case with notarized documents also. You can take some time, rectify, comeback and submit the document.
  • If there is going to be some change in the details compared to previous passport, notarize the document supporting the change (Ex: Indian Passport etc..)
  • Remember, we are going to deal with our own DESI brothers/sisters at the counters. So you never know what they will ask or going to say. I’m pretty sure some of you might hear them saying you will not have any options, so just be mindful. I’m not being sarcastic; I wanted you to be realistic.
  • Carry all the original documents and photo copies/notarized copies of important documents
  • Have exact change better don’t expect change from the office , carry a pen and glue stick

And all the information mentioned in this blog is my experience and observations. Each case would be different so better don’t held me responsible if something goes wrong , All these information is strictly for your information ONLY. So please refer to consulate sites for more information.

Steps to Renew Indian passport in USA!

  1. Complete the BLS Order Form
    • Location : Select the Location based on the consulate jurisdiction covering  your area of residence
    • Service Requested : Unless you are a frequent traveler select “Reissue of Passport Ordinary 36 pages”
    • Prepaid Delivery : This is not mandatory , you can mention this information while submitting the application at the office or you can prepare Prepaid envelopes from any service provider like FedEx or USPS . I personally collected the new passport from the office.
    • Payment Details : This is also not a mandatory filed so you can fill in these details later. These are basically useful while collecting your new passport
    • Other details are your personal details, fill in all other details
    • After saving the Order Form , you can choose your appointment time
    • You will have options choose the date and time slots , Time Slots will be 15 mins slots
    • Once you book the appointment , you should receive two mail from BLS one with the order form and other with appointment time
    • You have to show these two documents to the security guard to enter in to the building and guard will provide you with the token number
    • I’m not sure, if they allow you to the office any date after your appointment date ,but I sensed you can always request the guard to let you in because there are tatkal service users who doesn’t need any appointment
  2. Complete the   Online application form
    • Select Indian Mission based on the Consulate jurisdiction covering  your area of residence
    • Select Service as “Re-Issue of Passport”
    • Other fields are self-explanatory , fill in the personal details
    • Address to be Printed : This is the field , where we usually will have so many doubts
      • Here you can have your Indian  Address on your passport
      • If your Indian Address is going to be same as that of previous passport you don’t need any additional documents
      • If it is going to be different than your previous passport , you need to submit your address proof as a notarized document
      • Please make sure the document you submit has complete address that you wanted to print on the passport
      • To be on safer side make a notarized document with your Indian address irrespective whether it is same as previous passport or not
    • Once you Save & Continue , go the next page where you need to provide some more additional information about your Family and Passport
    • File No : You can find it on your passport last page
    • Page 3 , you will be asked to upload the image , you can ignore this page
    • Page 4 , You can click on the Generate PDF , which gives you a 3 page document
    • This is the Application with some additional fields , which you can’t edit within the PDF file. You have to take a Print out and fill the detail
    • FILL PRINTED APPLICATION  FORM (Same Online Application Form, you have printed earlier)
    • Payment of Fee , Amount be paid : 91.20
      • Office accepts Cash/Demand Draft / Money Order /Banker’s check
      • If you are submitting through mail Cash is not accepted
      • Mention respective mode of payment
    • Fill in other details , I have given additional details for some of the fields which may be little confusing .
    • Local car driving Licence No : Your US driving license information
    • When did the applicant First leave India
      • It’s the first time ever you have gone out of India. You can check your old passport for Immgiration stamps if you don’t remember the exact date
    • When was he/she in India last?
      • This is the last date you were India , even this info can be found from immigration stamps
    • How long has applicant continuously resided abroad?
      • I have mentioned number of months from the date of my first day in USA , not really sure.
    • Present Emigration Status (ECR or ECNR) ECR
    • Did applicant ever possess any other nationality or travel document of any other country?
    • Name and address of two relatives/friend
      • This could be either address  in India or US
    • Specimen signature or T.I.within the Space given below :
    • Put the signature in both boxes
  3. Fill In the Nationality Verification Form
    • Download the document , and fill in the details
    • Most of the fields are self-explanatory
    • DATE OF LEAVING INDIA: Last time when you flew out of India
    • PERIOD OF STAY ABROAD: Total duration of your stay abroad
    • NAME & ADDRESS OF TRAVEL AGENT INVOLVED IN SENDING THE INDIVIDUAL ABORAD :
      • You should get these details from your Air ticket , if not I guess you can mention your company name or Nil
  4. Print the Check list
  5. Notarize the documents
    • Notarized Photocopy of Proof of Valid Visa Visa on Passport/ Green Card/ Permanent  Residency Card/ Employee Authorization Card/ I-797 Approval Notice/ I-485 for  children, I-20 for applicants on student visa
    • Notarized Photocopy of Proof of Residence- For example Driving License/ Utility Bill –  Gas/Electricity/Water/ Rental lease agreement /Home Mortgage Bill
    • Make sure you get other documents (Any document that you think they might want to have a look at closely) notarized (Ex: India Address proof etc.. )
    • If you are an existing customer of BOA  they will notarize the documents for free of cost. Check with your bank or you can get these notarized with a public notary available at USPS at nominal charges ( If I remember correctly 5$ for each of the document and some additional service charges. So total it costs me 21$ for my I-797 , Visa & Driving license
  6. Get the photographs according to specs
    • Four photographs showing full frontal view of 2 X 2 inches size with light background
    •  8 Photos to be submitted in case of Lost/Damaged Passport and passport expired more than 3 yrs.
    • You can go any of the CVS Pharmacy /Walmart /Sears get this done in 2 mins , I got in CVS Pharmacy for 19$ for 4 copies .I’m sure you can find cheaper deals
  7. Finally Print all these applications and arrange everything in the order mentioned in the check list
    • BLS Order Form & Appointment Letter
    • Online Application Form (PDF printed and filled)
      • Paste one photo graph on this application
    • 3 copies of printed and filled Nationality Verification Form/ Personal Particulars form
      • I didn’t remember submitting three Nationality Verification Forms , but just as mentioned in the BLS site get 3 copies
      • Paste One photo on one of the Forms
      • Other two photo you have to directly submit to the officer at the counter
    • Original existing passport
      • You don’t need to submit I-94 , take out I-94 from passport keep it in a safe place. However you have to submit the ORIGINAL passport
    • Photo copy of first and last page including observation page if any
      • I have provided first,last and all my stamped Visa pages
    • Photocopy of the first five pages and last two pages of the passport
      • Yes this different set of copies from the earlier one
    • Fill the check List
      • You have to submit this checklist document along with the application

I guess that’s it you are good to submit the application , Thought I’m sharing my experiences I have referred to http://supradeepnarayana.wordpress.com/2010/12/23/renewal-of-indian-passport-in-us and http://sudee4u.blogspot.com/2012/11/how-to-renew-indian-passport-in-usa.html when i’ve submitted the my passport for renewal . So I would suggest you to visit these two blogs for more information

Mobile Web Application (Mobile Web Site) Development Best Practices

Often times it is so obvious that we follow the same approach as a typical desktop web application development and follow the same well known best practices to design a Mobile based web application also. However sometimes we will not realize if the typical desktop approach fits perfectly or not until we htt some road block.

Here I will try to share some of the critical issues that we have faced with one our mobile web application and best practices we should have carefully considered before starting the project.

There is plenty of information available about the Mobile Website best practices . Please carefully considered each of the best practices .This is one of the best documents that you should consider reading : http://www.w3.org/TR/mobile-bp/

Some of these best Practices covers both visual design and technical aspects you should consider while developing mobile websites to improve the user experience of the web site on mobile devices.

And each of the project is different from another project , so there is no guarantee that these best practices fits your project or not . So please use below steps for your information sake only. 

Devices

  • Clearly understand the devices you are going to support and try to exploit all the device capabilities to provide an enhanced user experience
  • Plan the important and widely used devices which should be given the priority while designing the mockups , because often times IPhone users will be given some preference over other browsers and more over each of the different devices comes in different screen sizes , so same mockup doesn’t fit perfectly in all the browsers.
  • Limit scrolling to one direction, unless secondary scrolling cannot be avoided.
  • Try avoiding the popups as much as possible

Unit Testing

  • Perform Unit Testing on actual devices not only on emulators
  • Often times we will perform the unit testing on Emulators , but there are quite a few behavioral differences between emulators and actual devices,  so perform UI compatibility validation on real time devices once HTML mockup’s are received plan to carry out testing on actual devices

 Behavioral differences

  • There are quite a few behavioral differences between mobile browsers & regular browsers
  • Regular website strategies & best practices might not work properly in mobile devices , so don’t rely on regular website design strategies
  • Do not rely on session cookies being available for mobile website design
  • Plan to handle session management without relying on the mobile browser cookie management

Navigation

  • Provide only minimal navigation at the top of the page
  • Older OS mobiles doesn’t support CSS property “position: fixed” . Plan to handle these cases differently

Search

  • Take into account the trade-off between having too many links on a page and asking the user to follow too many links to reach what they are looking for
  • Provide a filter kind of options to user to reduce number of key strokes or scrolling
  • Provide pre-selected default values where possible.

Performance

  • Do not use client side script heavily for the functionalities like auto redirection etc… Instead, design so that most of thees functionality  are handled at the server side 
  • Ensure that the overall size of page is appropriate to the memory limitations of the device and ensure to design the page considering the limitations well in advance
  • Keep the number of keystrokes to a minimum.

Videos

  • You may run in to videos not playing in certain old  the mobile devices(Android 2.1 ,2.2)
  • User HTML 5 <Video> tag for videosImage
  • Remove type and codec’s attribute from the source(<source src=”videos/movie.mp4″ type=’video/mp4; codecs=”avc1.42E01E, mp4a.40.2″‘>)  for videos to play properly in old devices
  • Keep the video size below 20 MB
  • Keep the video screen resolution to 400 * 224
  • For videos to display on Firefox add an .webm version of the same video
  • Add MIME Types to .htaccess file  of the webserver
  • Do not rely on embedded objects or script.

BackButton

  • You may face the issues with device back button , if we go back and forth between the pages using the mobile device back button the site will look completely  broken, this happens in older Android OS mobiles.
  • To fix this issue  add hashListingEnabled: false to the script.

Example:

$.extend(  $.mobile , {

hashListeningEnabled: false

});

  • One disadvantage to this approach is if we have any dialog window in the site it will not work properly, to avoid this add:

$(document).delegate(‘div[data-role=dialog]’, ‘pageinit’, function() {

$.extend(  $.mobile , {

hashListeningEnabled: true

});              

});

Images

  • When using background images make sure that content remains readable on the device.
  • Ensure that foreground and background color combinations provide sufficient contrast to satisfy for different mobile devices & screen resolutions
  • Do not rely on support of font related styling
  • Break the sprite image in to small sprite images
  • Specify the size of images(Width & Height) in the markup
  • Avoid large or high resolution images except where critical information would otherwise be lost

Error Messages

  • Plan ahead for the error pages or error message
  • Provide informative error messages and a means of navigating away from an error message back to useful information.

Other Best Practices :

  • Check for W3 Standard errors
  • Follow the best SEO optimization techniques
  • Provide the Mobile site specific sitemap.xml for SEO
  • Do not use pixel measures and do not use absolute units in markup language attribute values and style sheet property values
  • Keep the number of externally linked resources to a minimum.
  • Limit content to what the user has requested.
  • Provide a short but descriptive page title.
  • Do not use frames.
  • Where possible, use an alternative to HTML table tag
  • Ensure that content is encoded using a character encoding that is known to be supported by the device.
  • Keep the URIs of site entry points short.  
  • Provide caching information in HTTP responses.

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