Expand my Community achievements bar.

SOLVED

Communities Comment component

Avatar

Community Advisor

Hello All,

While looking into the OOTB comments component, I notice that there are two servlet calls (Using TemplateServlet class I think) 

Request URL:

 

Request Method:
GET

 

                                                                                                                        AND

  1. Request URL:
  2. Request Method:
    GET

Does anyone have any idea which JS file these calls are made from?

 

When I try to extend the comments component, the same calls are made but the selector parameters are empty as mentioned below..

 

Request URL:

 

Request Method:
GET

 

                                                                                                                        AND

  1. Request URL:
    http://localhost:6503/services/social/templates?resourceType=/apps/project/components/comments/comment&ext=hbs&selector=
  2. Request Method:
    GET

Please let me know if anyone has an insight on this..

Thanks

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

Those calls look ok to me. Is anything broken for you ?

These calls happens from the include statements of HBS files. If you look at comment.hbs (at /libs/social/commons/components/hbs/comments/comment) you will notice a line like 

{{include this template="toolbar"}}

This snippet is what is triggering the servlet call. So I would focus on fixing your include statements in your extended component.

But to answer your question, the file that is making the servlet call can be found at - /etc/clientlibs/social/commons/scf/scf.js (look for SCF.findTemplate)

Thanks

View solution in original post

3 Replies

Avatar

Administrator

I have asked internal experts to have a look at this.

~kautuk



Kautuk Sahni

Avatar

Correct answer by
Employee

Hi,

Those calls look ok to me. Is anything broken for you ?

These calls happens from the include statements of HBS files. If you look at comment.hbs (at /libs/social/commons/components/hbs/comments/comment) you will notice a line like 

{{include this template="toolbar"}}

This snippet is what is triggering the servlet call. So I would focus on fixing your include statements in your extended component.

But to answer your question, the file that is making the servlet call can be found at - /etc/clientlibs/social/commons/scf/scf.js (look for SCF.findTemplate)

Thanks

Avatar

Community Advisor

Thanks a lot Arun. 

Nothing seems to be broken for my extended component as of now. Its just that when in the browser console I saw calls made by both OOTB and extended component, I am wondering whether I should just see one set of calls for extended one rather than both. Should I see them? Just wanting to make sure if those calls were doing something I am not noticing now.

Also regarding including the toolbar.hbs in my comment.hbs I had to paste the toolbar.hbs in my comment.hbs since I wanted to make few display changes to toolbar.hbs. If we see the calls made because of extended component, the selector params are missing. May be because of that my include is not picked up..not sure. So I just added toolbar.hbs inside my comment.hbs to include changes (like "Remove" instead of "Delete")

I will look into the JS file you pointed to get more info and update here soon. 

Regards..