Communities Comment component

Avatar

Avatar

snbaem

Avatar

snbaem

snbaem

09-01-2017

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

aponnusa

Employee

Avatar

aponnusa

Employee

aponnusa
Employee

17-01-2017

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

Answers (2)

Answers (2)

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.8K

Likes

1.0K

Correct Reply

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.8K

Likes

1.0K

Correct Reply

1.1K
kautuk_sahni
Community Manager

16-01-2017

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

~kautuk

Avatar

Avatar

snbaem

Avatar

snbaem

snbaem

17-01-2017

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..