Expand my Community achievements bar.

comment section does not displays the comment due to dispacther rewrite rules

Avatar

Level 4

In general case :-

when user hits a page http://abc.com/content/abc/home.html and has a comment section on the page. If user posts a comment then 

it would get stored in /content/usergenerated/content/abc/home node

Current situation:-

we have a redirect rule in dispacther that when user hits the http://www.abc.org  it would internally render  the page from path  /content/abc/home.html

now i have a comment section on the page.If user  posts a comment it is getting stored  on

/content/usergenerated/content/abc/content/abc/home the problem i am facing is that  comments   posted are not getting showed up on the page

as i see the code in  /libs/collab/commons/components/comments/comments.jsp is having comment.getResource()  which points to /content/usergenerated/content/abc/home .

 if (cs.hasComments(WCMMode.fromRequest(request))) {

        -----
            %><sling:include resource="<%= comment.getResource() %>"/><%
        }

        out.flush();
        LinkCheckerSettings.fromRequest(slingRequest).setIgnoreExternals(false);

 

 

My query:-

So please let me know how to solve the issue that comment.getResource()  points to /content/usergenerated/content/abc/content/abc/home node, so that comments

come up on the page when user hits http://www.abc.org

2 Replies

Avatar

Level 9

Hi,

Would you please describe your environment - what version of AEM/CQ are you using and how is your platform configured?

Thanks,

  JK

Avatar

Level 4

We are using  AEM5.6.1 with collab comment  section "collab/commons/components/comments" used.  Now like   I mentioned above we are  building a site with  http://www.abc.org which internally point to the content /content/abc/home that is mentioned in dispacther rules and this  is causing the comment section with  /content/usergenerated/content/abc/content/abc/home instead of content/usergenerated/content/abc/home.

Please let me know what could be done.

Thanks