cancel
Showing results for 
Search instead for 
Did you mean: 

New field for the contact request form

apolci
Champ in-the-making
Champ in-the-making
I'm trying to add a field (Last Name) to the contact request form.

I've successfully modified the model and the form, and I modified the UgcService to add a new argument to the postFeedback method, but I get this error in the log while posting the contact request:

org.mozilla.javascript.EvaluatorException: Can't find method org.alfresco.wcm.client.impl.UgcServiceCmisImpl.postFeedback(java.lang.String,string,string,string,string,string,string,string,number). (/WEB-INF/webscripts/contact/form.post.js#88)
   at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
   at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1030)
   at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1086)
   at org.mozilla.javascript.Context.reportRuntimeError1(Context.java:1049)

This is the new metod I've added to the UgcServiceCmisImpl (the old one now delegate to this one):

   @Override
   public String postFeedback(String assetId, String visitorName,
         String visitorLastName, String visitorEmailAddress,
         String visitorWebsite, String type, String subject,
         String comment, int rating) {
        VisitorFeedback feedback = buildFeedbackObject(assetId, visitorName, visitorLastName, visitorEmailAddress,
                visitorWebsite, type, subject, comment, false, rating);
        return postFeedback(feedback);
   }

This is the section of write.post.js that is causing the error:


      webSite.ugcService.postFeedback(assetId, name, lastName, email, website, type, subject, comment, 0);

Anyone has some suggestion of what is wrong here? Did I missed something else that need to be modified?
Andrea
1 REPLY 1

apolci
Champ in-the-making
Champ in-the-making
Please ignore this post.

I was simply doing something wrong in the deploy process. Smiley Surprisedops:

Andrea