We are using SDL Tridion 2011 SP1 HR2. We have configured two CD WS ,the deployer and the java website to handle UGC. We have integrated identification of visitors through our external website user id by modifying the provided sample SyncUGCUserWithContact
class. While saving the comment through the UGC enabled page, the UGC USER name and email is saved properly but ID gets stored as null
. UGC user is synced during website authentication. Here the new user doesn't get saved because the condition claimStore.contains(BasePostClaimProcessor.USER_CLAIM)
is returned as false and so doesn't save anything.
final String ugcResponse = webServiceClient.getResponse("/Users?$filter=ExternalId eq '" + externalId + "'");
final List<UGCUser> ugcUsers = parseUsers(ugcResponse);
if (ugcUsers != null && !ugcUsers.isEmpty()) {
//sync exiting user
}
else
{
if (claimStore.contains(BasePostClaimProcessor.USER_CLAIM)) {
//// not entering here
}
}
Even when I enter a comment through CMS, the Administrator name and email is saved but ID is empty.
UPDATE 12/02/2013 12:26
There are no claim definitions with the uri "taf:claim:contentdelivery:webservice:user"
taf:request:cookies:
platform web
TAFSessionId tridion_6296c12a-ae5e-4e2f-9194-788a094390a7
language en
TAFTrackingId tridion_3244ee9e-cd27-434a-90ee-5f7dfa461bb5
Though tracking id and sessioid is stored in the cookies.
Taking a look at the logs for visitor WS, I can see the user_claim
2014-02-12 09:42:51,487 DEBUG AllowAnonymousPostClaimProcessor - No external user specified (also not in headers), using tracking id.
2014-02-12 09:42:51,487 DEBUG **ClaimStore - put: uri=taf:claim:contentdelivery:webservice:user, value=tridion_11f495d7-c97a-448f-ad56-4560ad2b385d**
2014-02-12 09:42:51,487 TRACE ODataInputParser - Parsing following queryString: /Comments
2014-02-12 09:42:51,487 TRACE BasePostClaimProcessor - User ID: tridion_11f495d7-c97a-448f-ad56-4560ad2b385d, Request URI: /odata.svc/Comments
2014-02-12 09:42:51,487 DEBUG ClaimStore - put:uri=taf:claim:contentdelivery:webservice:post:allowed, value=false
2014-02-12 09:42:51,487 TRACE AmbientDataServletFilter - There is no tracking cookie in the request!
2014-02-12 09:42:51,487 TRACE AmbientDataServletFilter - CookieClaim -taf:response:cookie:generation:true
2014-02-12 09:42:51,487 TRACE AmbientDataServletFilter - CookieClaim has value true, setting tracking cookie!
2014-02-12 09:42:51,487 TRACE AmbientDataServletFilter - setCookie -> name: TAFTrackingId, persistent: true, id:tridion_11f495d7-c97a-448f-ad56-4560ad2b385d
2014-02-12 09:42:51,487 DEBUG AmbientDataServletFilter - doFilter: contextPath=, sessionId=18753A6FCAFA992FC521E0B18317DF09
2014-02-12 09:42:51,487 DEBUG WebContext - setCurrentClaimStore: com.tridion.ambientdata.claimstore.WebClaimStore@77aaf64d, thread: http-192.168.1.201-8812-1
2014-02-12 09:42:51,487 TRACE AmbientDataServletFilter - setCookie -> name: AFSessionId, persistent: false, id:tridion_ce4dd922-9d10-4188-b417-571246c8bda6
2014-02-12 09:42:51,487 TRACE AmbientDataServletFilter - There is no tracking cookie in request, so generated a new one:tridion_75d3c896-fa44-4f95-9cf8-f8c6149f4a1b
2014-02-12 09:42:51,487 DEBUG ClaimStore - put: uri=taf:session:id, value=tridion_ce4dd922-9d10-4188-b417-571246c8bda6
2014-02-12 09:42:51,487 DEBUG ClaimStore - put: uri=taf:tracking:id, value=tridion_75d3c896-fa44-4f95-9cf8-f8c6149f4a1b
2014-02-12 09:42:51,487 DEBUG ClaimStore - put: uri=taf:session:attributes, value={}
2014-02-12 09:42:51,487 DEBUG ClaimStore - put: uri=taf:request:uri, value=/odata.svc/Comments
2014-02-12 09:42:51,487 DEBUG ClaimStore - put: uri=taf:request:full_url,value=http://192.168.1.201:8812/odata.svc/Comments
2014-02-12 09:42:51,487 DEBUG ClaimStore - put: uri=taf:request:headers, value={connection=[Ljava.lang.String;@7910769b,host=[Ljava.lang.String;@27daf835,accept=[Ljava.lang.String;@18dd7404,user-agent=[Ljava.lang.String;@72ebbf5c}
2014-02-12 09:42:51,487 DEBUG ClaimStore - put: uri=taf:request:parameters, value={PATH_INFO=[Ljava.lang.String;@53606bf5, CONTENT_TYPE=[Ljava.lang.String;@5f4fcc96, $orderby=[Ljava.lang.String;@47fe256b, QUERY_STRING=[Ljava.lang.String;@7000bcbc,$filter=Ljava.lang.String;@5ba5ba75,$expand=Ljava.lang.String;@5d748654,$top=[Ljava.lang.String;@d1f24bb, $skip=[Ljava.lang.String;@77a477b7,CONTENT_LENGTH=[Ljava.lang.String;@40671416}
2014-02-12 09:42:51,487 DEBUG ClaimStore - put: uri=taf:server:variables, value={REMOTE_USER=null, PATH_TRANSLATED=D:\Websites\website-odata1\odata.svc\Comments,SERVER_PORT=8812, SCRIPT_NAME=, REMOTE_ADDR=192.168.1.201, AUTH_TYPE=null, SERVER_PROTOCOL=HTTP/1.1, REQUEST_METHOD=GET, DOCUMENT_ROOT=D:\Websites\website-odata1\, REMOTE_HOST=192.168.1.201, SERVER_NAME=192.168.1.201, SECURE=false}
2014-02-12 09:42:51,487 DEBUG ClaimStore - put: uri=taf:request:cookies, value={}
2014-02-12 09:42:51,487 DEBUG AmbientDataServletFilter - Dispatching onSessionStart event
2014-02-12 09:42:51,487 DEBUG AmbientDataServletFilter - Dispatching onRequestStart event
2014-02-12 09:42:51,487 TRACE ODataInputParser - Parsing following queryString: /Comments
2014-02-12 09:42:51,487 TRACE BasePostClaimProcessor - User ID: tridion_11f495d7-c97a-448f-ad56-4560ad2b385d, Request URI: /odata.svc/Comments
2014-02-12 09:42:51,487 DEBUG ClaimStore - put:uri=taf:claim:contentdelivery:webservice:post:allowed, value=false